This terraform configuration us used to create server on top of this network and use remote state of the workspace above as input.
- Use Therraform Cloud as the backend. Create new workspace and create environment variables
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
. - Create github actions for Terraform.
- Create github secrets
GITHUB_TOKEN
. - For production used, create branch rule to protect main branch and enable require status checks to pass before merging.
- Configure run trigger by navigating to "Settings" page, under "Run Triggers" tab. Add run trigger by selecting the network worskpace and click "Add workspace". This is done so that whenever the network workspace is running Terraform Apply command, this server workspace is autoamtically running Terraform Apply too.