Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

terraforming should import connected resources using variables #97

Open
zdexter opened this issue Jul 20, 2015 · 3 comments
Open

terraforming should import connected resources using variables #97

zdexter opened this issue Jul 20, 2015 · 3 comments

Comments

@zdexter
Copy link

zdexter commented Jul 20, 2015

Right now, terraforming ec2 will produce a hardcoded list of related resources' internal AWS identifiers. But terraform supports variables, which allow you to, say, create security groups and ec2 instances on one terraform run, as opposed to creating these dependencies first, then update the ec2 resources' security group IDs in your aws_instance blocks.

terraforming should support importing connected resources, such as security groups, and connecting them to parent resources using variables.

@dtan4
Copy link
Owner

dtan4 commented Aug 1, 2015

I'm sorry but I have no plan to implement this feature right now.
If you really need this feature, I always welcome pull request :octocat:

Terraforming generates one resource at every command execution, not generate multiple resources at once. I think it is not a good way to include other resource dependencies to generated result.
Moreover, this feature increases a complexity of codes... I'd like to keep it simple.

@dtan4 dtan4 mentioned this issue Feb 3, 2016
@autotune
Copy link

autotune commented Mar 1, 2016

@dtan4 I'm aware that you have no plans to support this feature, but this would be incredibly useful. It's rather difficult to have to go in and manually replace hardcoded references with variables, especially when you have something like 20 of them - this feature would allow for a truly exportable and, more importantly, portable infrastructure. I'd find working on this feature to be rather interesting if I can get my ruby chops up to snuff.

@Binternet
Copy link

+1
I've created a script which search-replace the .tf file from hardcoded values to variable references for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants