4 ms·
This is a really important question and I'm glad you brought it up. We're actively working on a way to bring existing infrastructure under Terraform management
by mitchellh 12y ago
This is a really important question and I'm glad you brought it up.
We're actively working on a way to bring existing infrastructure under Terraform management without having to recreate it from scratch. The process will actually be really easy (but is vaporware at the moment): Terraform only needs the TYPE of a resource and ID of that resource. From there, it can "refresh" the rest of the metadata in.
Our idea is that you'll be able to say "I have an `aws_instance`, it's ID is `i-1234567`, and it satisfies the 'foo' resource" and it'll attach it.
Point being: we're thinking about this, and it is an important aspect of Terraform.
Another point is that you don't need to convert 100% of your infrastructure to Terraform to extract value from it. You can start by putting only specific services under management, and grow from there.
- mihok 12y agoUnreal, I am really stoked to start playing around with this!! Thanks Mitchell & Hashicorp team!
- kesor 12y agoThis could maybe be similar to devstructure's blueprint, just for infrastructure.
- wernerb 12y agoHi, I think declarative resource management like this is the definitive future (or present as of now). I was wondering what happens when you increase the amount of nodes of a particular instance? I assume a new machine is started. But what happens if you remove the entire resource altogether, does it terminate the whole cluster? Similarly how does a scaling in a node work? And how would it affect dependencies? How does this consolidate with elasticity of a particular cluster. I.e. if an amazon load balancing group destroys an instance or takes one up, do I simply refresh and it would detect that this new instance is part of the defined cluster in terraform? Awesome work on this tool.
- davidpelaez 12y agoGlad to hear you are thinking on how existing infrastructure could be integrated to Terraform. I think this is specially important with elastic IPs that have been whitelisted somewhere, e.g. a VPN of a 3rd party service provider. So a way to say, take EIP x.x.x.x, don't ever release it and then indicate what instance to associate it to is great. Another example of this feature is starting from an existing VPC and build from there, or even actually inherit information from the current state and convert it to an "auto generated plan" to build from. Thanks again Hashicorp for all the great software.