HiveBrain v1.2.0
Get Started
← Back to all entries
snippetterraformMinor

How can I keep track of my Cloud Resource use?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
cantrackresourcekeepcloudhowuse

Problem

I am trying to automate my AWS application deployment with Jenkins.

Right now if we want to update the application in any of the environments, say UAT, we build our docker images, find the current ECS Task and update it with the new image, find the running ECS Cluster, and update the tasks.

Broadly, what is best practice for keeping track of cloud resource Id's (ECS Cluster Id's, ECS Task Id's, EC2 Id's, etc) in your Continuous Integration environment?

Solution

A judicious usage of one of the cloud "orchestration" tools, such as Terraform or possibly Fugue seems to be the best way.

You can start small, pick a less important and not very extensive environment, carefully decipher it into automatable code and proceed from there.

Broadly this is referred to as infrastructure-as-code, for googling and other buzzword-oriented media applications.

More specifically, say, if you had your environment described in Terraform's HCL files, you would have required ID's exported as "outputs" and could operate on those from scripts/Jenkins jobs/etc

Context

StackExchange DevOps Q#16, answer score: 9

Revisions (0)

No revisions yet.