Use AWS credentials to deploy review apps#1854
Conversation
ece02c0 to
2b43fee
Compare
26ffaa2 to
23d2f05
Compare
|
sarahseewhy
left a comment
There was a problem hiding this comment.
This looks sensible, thank you.
23d2f05 to
c5e6deb
Compare
This prevents us attempting to run multiple instance of terraform at the same time. Instead, the current running workflow will complete before the next one starts. Only 1 running and 1 pending workflow is allowed - any further workflows will supercede the pending one.
Instead of running Terraform directly in the GitHub Actions runners, we now trigger AWS CodeBuild projects to handle the deployment and destruction of review apps. This means that the repository no longer needs extensive AWS permissions in GitHub Actions, and the actual available AWS operations are limited.
86e9caf to
b952023
Compare
These fields are automatically added by AWS when creating a task definition. If we don't include them in our task definition, Terraform tries to remove them on every apply, which causes unnecessary changes to the task definition (and thus noise in our Terraform plan output).
b952023 to
5db180e
Compare
|
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-1854.submit.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |



What problem does this pull request solve?
Trello card: https://trello.com/c/UIEQ97bl/792-stop-using-self-hosted-runners-on-github
Rather than using a codebuild runner to deploy the review apps, instead authenticate to AWS with OIDC and deploy them there using codebuild.
This depends on alphagov/forms-deploy#1958 being merged first.
EDIT: do terraform in codebuild instead. keeping both implementations for review. will squash later.
Things to consider when reviewing