You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a complex terraform setup with many state files and modules spread across multiple repositories. We're trying to create a minimal subset of the infrastructure to use for application smoke testing
Options:
extend the current configuration to have variables that allow for creating just the minimal set of resources for smoke testing, however this significantly increases the complexity of the configuration
create a separate config, however this has high risk of drift without significant effort to maintain parity between the configurations
use terraform remote state, however as mentioned above it's split across many different state files so can be difficult to maintain the integrations between them
use data resources to pull in a resources attributes and then create a new resource using the data attributes as values, seems to solve most of the issues, but some syntactic sugar might make this easier
Proposal:
Make it easy to 'clone' a resource, overriding specific arguments (i.e. to avoid naming collisions)
I'm not sure if this is even possible as it would require knowing the resource type, but the intention is to essentially first perform a data lookup of the source, expand it into the equivalent resource type, map the fetched attributes to the arguments, but override the ones specified in the override block.
Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!
Description
Use case:
We have a complex terraform setup with many state files and modules spread across multiple repositories. We're trying to create a minimal subset of the infrastructure to use for application smoke testing
Options:
Proposal:
Make it easy to 'clone' a resource, overriding specific arguments (i.e. to avoid naming collisions)
I'm not sure if this is even possible as it would require knowing the resource type, but the intention is to essentially first perform a data lookup of the source, expand it into the equivalent resource type, map the fetched attributes to the arguments, but override the ones specified in the
override
block.New or Affected Resource(s)/Data Source(s)
azurerm_clone
Potential Terraform Configuration
References
No response
The text was updated successfully, but these errors were encountered: