News for hackers. Stuff that matters.
Re:Terraform 0.15 General Availability by kstrauser on Wednesday April 14, 2021 @08:19PM (#26814788)
I think there's a middle ground if you're not sure how to fix a mistake in Terraform but you know how to do it in the console:

* Make your changes by hand

* Right afterward, run "terraform plan" to see how Terraform would undo your changes

* Edit your Terraform config to reflect those changes, and run "terraform plan" again to make sure you caught everything. Repeat until it's a no-op.

Now you've got a log of what you've done in a Git-ready format, and you can repeat it elsewhere, and you've learned how to make that console change in code.

Re:Terraform 0.15 General Availability by pm90 on Thursday April 15, 2021 @02:45AM (#26816882)
This. I’m surprised at how many folks don’t realize you can do this and capture your changes in terraform by looking at the plan and making tf code changes until the plan doesn’t show a diff
Re:Terraform 0.15 General Availability by te_chris on Thursday April 15, 2021 @03:39AM (#26817287)
You can also fetch cloud resource state with terraform, without running plan - I can’t remember the exact command. You can use this to import new resources into tf
Re:Terraform 0.15 General Availability by matwood on Wednesday April 14, 2021 @09:35PM (#26815238)
You can do it that way, but I find the tf docs easier and more concise to use than clicking around the AWS UI.
Re:Terraform 0.15 General Availability by kstrauser on Thursday April 15, 2021 @12:33AM (#26816221)
I do too, but that was an invaluable tool when we were first switching over and learning the ropes.