Skip to content
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

Add atmos terraform generate backends command #200

Merged
merged 3 commits into from Sep 11, 2022
Merged

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Sep 11, 2022

what

  • Add atmos terraform generate backends command

why

  • Generate terraform backend configs for all terraform components
  • Supported formats HCL and JSON
  • A GitHub Action that generates all .tfvar files and backend.tf files so that projects can be used with conventional terraform GitOps tools like atlantis, Terraform Cloud, et al.

related

test

# hcl is default, no need to specify it
atmos terraform generate backends --format=hcl

Writing backend config for the terraform component 'test/test-component' to file 'examples/complete/components/terraform/test/test-component/backend.tf'
Writing backend config for the terraform component 'infra/vpc' to file 'examples/complete/components/terraform/infra/vpc/backend.tf'
Writing backend config for the terraform component 'top-level-component1' to file 'examples/complete/components/terraform/top-level-component1/backend.tf'
atmos terraform generate backends --format=json

Writing backend config for the terraform component 'test/test-component' to file 'examples/complete/components/terraform/test/test-component/backend.tf.json'
Writing backend config for the terraform component 'infra/vpc' to file 'examples/complete/components/terraform/infra/vpc/backend.tf.json'
Writing backend config for the terraform component 'top-level-component1' to file 'examples/complete/components/terraform/top-level-component1/backend.tf.json'

image

@aknysh aknysh added the minor New features that do not break anything label Sep 11, 2022
@aknysh aknysh self-assigned this Sep 11, 2022
@aknysh aknysh requested review from a team as code owners September 11, 2022 03:43
@aknysh aknysh merged commit c7e5f64 into master Sep 11, 2022
@aknysh aknysh deleted the add-generate-backends branch September 11, 2022 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Generate All Terraform Backend Configurations
3 participants