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

Unable to overide variables with dce client / have to deploy with Terraform #382

Open
fdeswardt opened this issue Sep 29, 2020 · 2 comments

Comments

@fdeswardt
Copy link

Version information

  • DCE version: 0.5
  • OS version: MacOS 10.15.7
  • Go version: whatever DCE CLI comes with
  • Terraform version : whatever DCE CLI comes with

Describe the bug
After deploying DCE with the DCE CLI using dce system deploy unable to override the variables reset_nuke_template_bucket and reset_nuke_template_key with Terraform afterwards as the TF init directory is located at $HOME/.dce/.cache/module/.terraform directory that contains only main.tf as it's module and does not contain these variables. Tried to init the directory $HOME/.dce/.cache/module/.terraform/modules/dce/modules using the state file produced by DCE CLI deployment but the tf plan wants to remove all the infrastructure and replace it with a complete new set of DCE infrastructure and I would have expected a plan that at most will replace the CodeBuild infrastructure or even better just update the Environment variables of the Code Build project.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy DCE with CLI i.e. "dce system deploy"
  2. Try tf plan -var reset_nuke_template_bucket=some-bucket-name -var reset_nuke_template_key=custom-config-files/aws-nuke-default.yaml that naturally errors out that the variables are not specified in module main.tf
  3. Also tried dce system deploy --tf-apply-options "-var reset_nuke_template_bucket=some-bucket-name -var reset_nuke_template_key=custom-config-files/aws-nuke-default.yaml" which exits with code 1 without any explanation and didn't find any logs that could help 🤷‍♂️

Expected behavior
Would expect the DCE CLI --tf-apply-options to work though now exits with error code 1.

Additional context
Is modifying TF variables supported when using DCE CLI, and is it supported to modify then post deployment, or do you have to specify the variable overide values at the time of deployment? What if you want to change the variables after deployment? Is TF deployment the better option if one feels the need to override any variables?`

@thebigcosinus
Copy link

Hi, did you find a solution with the dce cli to update the deployement ? I ve got the same issue on my side.

@fivehorizons
Copy link

Version information

  • DCE version: 0.5
  • OS version: MacOS 10.15.7
  • Go version: whatever DCE CLI comes with
  • Terraform version : whatever DCE CLI comes with

Describe the bug After deploying DCE with the DCE CLI using dce system deploy unable to override the variables reset_nuke_template_bucket and reset_nuke_template_key with Terraform afterwards as the TF init directory is located at $HOME/.dce/.cache/module/.terraform directory that contains only main.tf as it's module and does not contain these variables. Tried to init the directory $HOME/.dce/.cache/module/.terraform/modules/dce/modules using the state file produced by DCE CLI deployment but the tf plan wants to remove all the infrastructure and replace it with a complete new set of DCE infrastructure and I would have expected a plan that at most will replace the CodeBuild infrastructure or even better just update the Environment variables of the Code Build project.

To Reproduce Steps to reproduce the behavior:

  1. Deploy DCE with CLI i.e. "dce system deploy"
  2. Try tf plan -var reset_nuke_template_bucket=some-bucket-name -var reset_nuke_template_key=custom-config-files/aws-nuke-default.yaml that naturally errors out that the variables are not specified in module main.tf
  3. Also tried dce system deploy --tf-apply-options "-var reset_nuke_template_bucket=some-bucket-name -var reset_nuke_template_key=custom-config-files/aws-nuke-default.yaml" which exits with code 1 without any explanation and didn't find any logs that could help 🤷‍♂️

Expected behavior Would expect the DCE CLI --tf-apply-options to work though now exits with error code 1.

Additional context Is modifying TF variables supported when using DCE CLI, and is it supported to modify then post deployment, or do you have to specify the variable overide values at the time of deployment? What if you want to change the variables after deployment? Is TF deployment the better option if one feels the need to override any variables?`

Is this still an issue? I am having issue with terraform deploy and lambda being not ready. So would try this but want to override nuke settings

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

No branches or pull requests

3 participants