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

[FEATURE] Improve clone with after action #1529

Open
abtris opened this issue Mar 6, 2024 · 1 comment
Open

[FEATURE] Improve clone with after action #1529

abtris opened this issue Mar 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@abtris
Copy link

abtris commented Mar 6, 2024

Is your feature request related to a problem? Please describe.

I'm using clone feature to create new regions. Region is main stack in our structure. If I need create new region I can just terramate experimental clone eastus eastus2 and have new region. But what I'm missing that after that I need change location in config file in stack I called region_config.tm.hcl and run terramate generate to update all tree.

Describe the solution you'd like

Will be great if I can script it via scripts and just add as after action for clone. If we can have accessible name of cloned stack that we can use as variable that will great.

Describe alternatives you've considered
Maybe is some other way how to do it but I don't find any.

Additional context
region_config.tm.hcl contains for variables for specific for Azure cloud as (location, subscriptionId, environment).

@abtris abtris added the enhancement New feature or request label Mar 6, 2024
@abtris abtris changed the title Improve clone with after action [FEATURE] Improve clone with after action Mar 6, 2024
@mariux
Copy link
Contributor

mariux commented Apr 17, 2024

Thanks for sharing this idea. clone is meant to be used in shell scripts or on command line. So any action you want to do after the clone command can be added to the shell script or needs to be executed afterwards (This assumes you have the script you want to execute after anyways)

You can execute actions just on the changed stacks to limit it to the newly cloned stack.

You could also extract the region/location based on the path and do not need to hard code it.

If this doe snot help, we would need to understand your context better. Please share additional information here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants