-
July 31st, 2022, 09:07 PM
#1
Question about Terraform writing to the .tf file based on environment
Currently, if you have an env and run the 'terraform plan' command, it will connect to the env and compare the difference between the state of your live env vs your .tf files. Afterwards, it informs you of what will change to the live env based on the .tf file.
I know this is a long shot but, is there a way to check the live env and change the .tf file to reflect the live env?
For example, lets say i have an Azure resource group with no tags. Someone else went into the azure portal and added a tag. The next time i run the 'terraform plan' command, it will notice the difference and ask me if i want to apply the change (based on the .tf file). I wish there was a way to take the tag (that i wouldve removed) but add it to the .tf file. This way, theyre both now in sync if it writes the tag to the .tf file.
Last edited by existenceproduct; July 31st, 2022 at 09:13 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|