-
Notifications
You must be signed in to change notification settings - Fork 1
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
Terraform bootstrap recipe #26
Terraform bootstrap recipe #26
Conversation
39bd0ba
to
b9a9dc3
Compare
f09d7d0
to
92e64d6
Compare
d5b4d81
to
62ade0b
Compare
2c92ac7
to
d109ced
Compare
d109ced
to
1a51726
Compare
774e0e0
to
516f44f
Compare
Jalapeno now supports conditional variables and table variables, which could be useful for this recipe |
ca56e51
to
23cfcf0
Compare
Needs a "--" to make `task` pass it in .CLI_ARGS instead of trying to parse it as a subcommand.
Once we generate the backend.tf file, we can't run the `terraform output` command to get the storage account access key before we re-init, but we can't re-init because we don't have the access key. Therefore we do this in 3 steps instead of 2: 1. Create storage account 2. Grab the access key into `terraform-backend.config` 3. Create the `backend.tf` file
Rules are official Azure naming rules
We will use this to bootstrap state management for all envs in one go
It's a separate storage account so this is redundant
This is the case when e.g. init'ing a second environment
ac6aa39
to
fbb5670
Compare
…cipe-as-one-of-first-possible-killer-recipes
uses: ./.github/workflows/terraform-plan.yml | ||
with: | ||
ENVIRONMENT: {{ $env.NAME }} | ||
TERRAFORM_VERSION: {{ "${{ env.TERRAFORM.VERSION }}" }} |
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.
@majori this should be env.TERRAFORM_VERSION
with an underscore probably, right?
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.
Indeed!
For some reason the env context is not available in the with block of a reusable workflow. See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. With this change we use vars instead.
…bootstrap-recipe-as-one-of-first-possible-killer-recipes' into ilkka/20-Create-Terraform-state-bootstrap-recipe-as-one-of-first-possible-killer-recipes
Forgot to change these refs to secrets
…cipe-as-one-of-first-possible-killer-recipes
…form-state-bootstrap-recipe-as-one-of-first-possible-killer-recipes
This way users of this recipe can use it in their own resource names if they need to be globally unique (e.g. KV) fixup: pass the ctx
We need this so we can fix things up with az cli later
If we're doing the GA pipeline, we need to switch the owner role assignment over from the user running the init task to the GA SP. It requires us to slightly change how the IDs and other things are managed.
No description provided.