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

Conditionally generate tfvars for non-core accounts #4743

Merged
merged 8 commits into from
Aug 8, 2023

Conversation

dms1981
Copy link
Contributor

@dms1981 dms1981 commented Aug 8, 2023

This PR relates to #4139. As we make use of networking.auto.terraform.tfvars to share resources, it's not relevant to our core accounts and as such this PR makes its creation conditional.

  • Updates the scripts that output this file to conditionally skip the creation when we read the account type from environments/*.json and see that they account-type value is core.
  • Removes networking.auto.terraform.tfvars from core accounts.
  • Adds defaults to base_variables.tf for both core-sandbox and core-vpc accounts to accommodate removal of tfvars.
  • Tidies up some of core-sandbox account to remove some unused code and fix a broken data call.

@dms1981 dms1981 requested a review from a team as a code owner August 8, 2023 09:19
@dms1981 dms1981 marked this pull request as draft August 8, 2023 09:21
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:

Checkov Scan Success

Show Output
*****************************

Checkov will check the following folders:

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:

Checkov Scan Success

Show Output
*****************************

Checkov will check the following folders:

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:

@dms1981 dms1981 marked this pull request as ready for review August 8, 2023 10:21
Copy link
Contributor

@markgov markgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dms1981 dms1981 merged commit fbb1a19 into main Aug 8, 2023
@dms1981 dms1981 deleted the feature/4139-generate-tfvars-condition branch August 8, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants