Skip to content

Only one level of includes is allowed #303

@cstavro

Description

@cstavro

I'm trying to enable a multi-include scenario where I can cascade includes at different points in my configurations. Given the below layout:

└── root
    ├── regions
    │   ├── us-east-1
    │   │   ├── regional_deployment(lambda)
    │   │   │      └── terraform.tfvars
    │   │   ├── config.tfvars
    │   │   └── terraform.tfvars
    │   └── us-east-2
    │       ├── regional_deployment(lambda)
    │       │      └── terraform.tfvars
    │       ├── config.tfvars
    │       └── terraform.tfvars
    ├── config.tfvars
    └── terraform.tfvars

I would like to be able to set the remote_state in the root terraform.tfvars while allowing for the notion of regional configurations. Some deployments are regional by nature (aws lambdas as an example) and so I think it makes sense to allow for this kind of modeling.

Right now I'm adding a separate extra_arguments block in each regional deployment's terraform.tfvars that includes required_var_files = ["${get_tfvars_dir()}/../config.tfvars]" . It works but it's not very DRY. Being able to have the regional terraform.tfvars leverage an include block to roll up to its parent would be even more so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions