-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusable GHA for Terraform deploy #323
Conversation
storage_account_name = "tfstaterv2024" | ||
container_name = "rv-tfstate" | ||
key = "dev.terraform.tfstate" | ||
use_oidc = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are just auto formating changes
storage_account_name = "tfstaterv2024" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming these are for each of the different dev environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats correct! so with TF you can store the configuration state files either locally on our computers or a in a central location. these config files basically create and update these files in a global AZ Resource Group in the same account subscription. the benefit of separating them out into individual files like this is so we can use the -backend-config=config/${{ inputs.deploy-env }}.config
flag in the terraform
cli. We are no using that here in a reusable GHA:
terraform init -backend-config=config/${{ inputs.deploy-env }}.config |
In the future however, I would like to research and find out if this is for sure the best and most appropriate way of doing this but for now, this allows for a bunch of flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Would love to test out the e2e flow when it is ready.
💯 ! Getting very close for sure. |
Description
This is so we can finally automate the Terraform apply process with Github Actions rather than from my personal command line. This will be added to the combined deployment.
Screenshots (if applicable)
Related Issues
[Link any related issues or tasks from your project management system.]
Checklist