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

feat: account variable set #55

Merged
merged 34 commits into from
Aug 5, 2024
Merged

feat: account variable set #55

merged 34 commits into from
Aug 5, 2024

Conversation

jorrite
Copy link
Contributor

@jorrite jorrite commented Jul 26, 2024

This PR:

  • Creates an account variable set.
  • Creates the (at most) 3 variables (account, environment, workload_permissions_boundary_arn) inside the variable set, instead of passing them down to each workspace (and then creating individual workspace variables).
  • Attach account variable set to all workspaces.

The net result here is a lot of less resources. With the following example: 20 workspaces, 4 environments (accounts), 4 variables:

variables variable sets variable set attachments total resources
before 320 [20×4×4] 320
after 16 [4×4] 4 80 [4x20] 100

Additionally, variables and an output is provider to add more variables to the same account variable set. The variables are there for things you know up front, the output is there for variables that might have values that relate to things you provision inside the accounts.

@github-actions github-actions bot added the feature New feature or request label Jul 26, 2024
Copy link
Contributor

github-actions bot commented Jul 26, 2024

Terraform Format and Style 🖌failure

Terraform Initialization ⚙️``

Terraform Lint 📖skipped

Terraform Validation 🤖skipped

Validation Output


@jorrite
Copy link
Contributor Author

jorrite commented Jul 26, 2024

Oh, this entire change is dependent on schubergphilis/terraform-aws-mcaf-workspace#62. I've pinned on the git hash 6f6c0c8 for the workspace module. Once that PR is merged and has a stable tag, that will need to get updated here, of course.

variables.tf Show resolved Hide resolved
@jorrite
Copy link
Contributor Author

jorrite commented Jul 29, 2024

Updated the OP to reflect that this PR isn't a hybrid anymore, it changes the default behavior. ☝️.

main.tf Outdated Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
@jorrite jorrite force-pushed the environment_variable_sets branch from b44cda7 to c1b92e7 Compare August 5, 2024 11:21
@jorrite jorrite merged commit 3e83deb into master Aug 5, 2024
@jorrite jorrite deleted the environment_variable_sets branch August 5, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants