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

ha-nat_subnets_cidrs - dont support list of 1-2 elements. #1

Open
dmatusiewicz opened this issue Sep 1, 2016 · 0 comments
Open

ha-nat_subnets_cidrs - dont support list of 1-2 elements. #1

dmatusiewicz opened this issue Sep 1, 2016 · 0 comments

Comments

@dmatusiewicz
Copy link
Contributor

dmatusiewicz commented Sep 1, 2016

Problem with:
https://github.com/cartest/terraform-buildtools

How to reproduce:

Error applying plan:
2 error(s) occurred:
index 1 out of range for list module.ha-nat.subnet_ids (max 1) in:
$
{module.ha-nat.subnet_ids[count.index]}
* index 2 out of range for list module.ha-nat.subnet_ids (max 1) in:

${module.ha-nat.subnet_ids[count.index]}
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

How to apply fix:

  • terraform destroy
  • edit file main.tf in step1 directory "step1"

(...)

source = "git::https://github.com/cartest/terraform-buildtools?ref=dawidm/tests"
(...)

  • rm -rf .terraform
  • terraform get
  • terraform apply

We should have to consider,address and document the limitation that we have in buildtools module.
we can create buildtools module only with fixed list of: ha-nat_subnets_cidrs

  • if we define 3 element list we cant extend or shrink or extend the list and make apply. The module will throw an error.
  • it is not a big deal so my sugestion is to document this problem in README.md
@dmatusiewicz dmatusiewicz mentioned this issue Sep 1, 2016
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

1 participant