IssueRaiser

Implement the stack concept

### OpenTofu Version ```shell OpenTofu v1.6.0-alpha5 on linux_amd64 ``` ### Use Cases Stack a way to split monolith infrastructure configurations to smaller subsets, each subset of configurations manages the corresponding subset of the infrastructure, which has the following benefit - reduce blast radius - faster to apply - less api costs - make collaboration easier (like less merge conflicts) Terraform announces they will be adding the stack in their official implementation https://www.hashicorp.com/blog/terraform-stacks-explained ### Attempted Solutions It already be resolved with different custom implementations, e.g. we can simply use folders as stacks, and have different variables for different environments ``` ├── service-bar │   ├── database.tf │   ├── ec2.tf │   ├── elb.tf │   └── vars │   ├── all.tfvars │   ├── production.tfvars │   └── staging.tfvars └── service-foo ├── database.tf ├── ec2.tf └── elb.tf ``` This will usually require a custom wrapper to tofu or terraform to pass the different vars when running the plan and apply This customization logic also implemented in several third party tools including terragrunt, terramate etc. ### Proposal all the third party or customized implementation works great, but since terraform is going to standardize it I'd also like to see it being standardized in tofu so we can be more consistent and focus on 1 tool (tofu) itself for scaling the configurations for large projects ### Ref

Posted by chenj100 on Nov 28, 2023, 4:44 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Other)

Implement the stack concept

chenj100Nov 28, 2023, 4:44 AM

### OpenTofu Version ```shell OpenTofu v1.6.0-alpha5 on linux_amd64 ``` ### Use Cases Stack a way to split monolith infrastructure configurations to smaller subsets, each subset of configurations manages the corresponding subset of the infrastructure, which has the following benefit - reduce blast radius - faster to apply - less api costs - make collaboration easier (like less merge conflicts) Terraform announces they will be adding the stack in their official implementation https://www.hashicorp.com/blog/terraform-stacks-explained ### Attempted Solutions It already be resolved with different custom implementations, e.g. we can simply use folders as stacks, and have different variables for different environments ``` ├── service-bar │   ├── database.tf │   ├── ec2.tf │   ├── elb.tf │   └── vars │   ├── all.tfvars │   ├── production.tfvars │   └── staging.tfvars └── service-foo ├── database.tf ├── ec2.tf └── elb.tf ``` This will usually require a custom wrapper to tofu or terraform to pass the different vars when running the plan and apply This customization logic also implemented in several third party tools including terragrunt, terramate etc. ### Proposal all the third party or customized implementation works great, but since terraform is going to standardize it I'd also like to see it being standardized in tofu so we can be more consistent and focus on 1 tool (tofu) itself for scaling the configurations for large projects ### Ref

Comments (0)

No comments yet. Start the discussion.

Comment on this issue