Wanted to try Cloud9 but didn't feel like making an EC2 instance in the GUI.
— Morgan (@runtcpip) February 1, 2022
So I made a Terraform file instead, remade a default VPC, and it took 20 minutes of troubleshooting. #AWS
9/20/2023: The open source version of Terraform is now OpenTofu
👉🏾 Find the Notion page of this post here, if it's easier for you.
It certainly looks nicer!
Setup:
An EC2 instance
A reference to the default VPC, which I had to remake, as I had deleted mine.
Downloading Terraform into Cloud9:
Instructions here.
Done and Done. Now, How About Using It?
The kicker (or blessing) is that Cloud9 doesn't auto save, like I’ve set my VSCode up to do. Had to do a lot of manual saving, but it wasn’t a struggle.
The lock file is created, but I don't see it in my file system to the left until resources have been pushed, so I made a simple bucket to try it out.
Because this instance is attached to my AWS account, I suppose anything I make within this will be as well. Let's see!
Does Every Terraform Command Work in Cloud9?
While I haven’t explored the scope of commands, some (terraform apply -refresh-only
) work in VSCode, not Cloud9.
How Do I Stop It?
While I deleted my EC2 instance I had pushed through VSCode, I had to terminate the Cloud9 instance separately.
There is probably a way to kill the 9 setup without killing the EC2 instance as well.
Comments
Post a Comment