Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: check if the resources of a given configuration already exists on the provider and not on the state files #12564

Open
lucasvasconcelos opened this issue Mar 9, 2017 · 1 comment

Comments

@lucasvasconcelos
Copy link
Contributor

lucasvasconcelos commented Mar 9, 2017

Hi there,

We have the following use case:

  • We'd broken our configurations in small pieces per-app and sometimes even a single app have 2 configurations if it has a lot of dependencies;
  • We maintain (any change become a Pull Request and it is reviewed) our infrastructure with Terraform on AWS, and we are heavy users of terraform_remote_state and data sources to reference values inter-configurations;
  • We chose this approach to gain more parallelism and mitigate accidents on critical resources;

So, we are looking for ways to help with our reviews on Terraform codes and even "test" them.

Want to see if this feature makes sense: a new flag on the plan command (or a new command) that is able to check on the provider if the resources found inside that configuration already exists on the provider and not on the state file and show them (exits 1 if at least one resource already exists)

Maybe this can be achieved with the codebase used by the data sources feature.

In our case, for example, we can prevent a possible overwrite in a route53 record that was already created in another configuration. And we can even create "automated tests" for our Terraform Pull Requests that fails if the code have this kind of inconsistency.

Don't really know if the core or even the providers makes this feature possible.

@lucasvasconcelos
Copy link
Contributor Author

lucasvasconcelos commented Mar 9, 2017

If it makes sense, I'm able to help with the implementation.

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

No branches or pull requests

2 participants