hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
401 stars 484 forks source link

Provider-aws latest release has a conflict with consul-cluster module #181

Closed rafaelremondes closed 4 years ago

rafaelremondes commented 4 years ago

In the last version of the aws provider, v3.0.0, following conflicts appear for resource resource/aws_autoscaling_group when running a terraform plan

Error: "availability_zones": conflicts with vpc_zone_identifier

  on .terraform/modules/consul_cluster/terraform-aws-consul-0.7.6/modules/consul-cluster/main.tf line 14, in resource "aws_autoscaling_group" "autoscaling_group":
  14: resource "aws_autoscaling_group" "autoscaling_group" {

Error: "vpc_zone_identifier": conflicts with availability_zones

  on .terraform/modules/consul_cluster/terraform-aws-consul-0.7.6/modules/consul-cluster/main.tf line 14, in resource "aws_autoscaling_group" "autoscaling_group":
  14: resource "aws_autoscaling_group" "autoscaling_group" {

Related to this change: https://github.com/terraform-providers/terraform-provider-aws/pull/12927

Only one of the two parameters(vpc_zone_identifier, availability_zones) should be passed right?

brikis98 commented 4 years ago

3.0.0 just came out, with some backwards incompatible changes, and we have not yet tested/upgraded this repo for it. As a short term workaround, you can pin your AWS provider to 2.x.x.

Only one of the two parameters(vpc_zone_identifier, availability_zones) should be passed right?

I think we want to pass both, but we probably need to change the default for our corresponding input variables in consul-cluster to be null. Would you be up for a PR that makes that change?

rafaelremondes commented 4 years ago

Hey @brikis98

Yes, I pinned the provider-aws version and it worked.

Sure, I'll test it and open a PR. Thanks for the help

andrew-womeldorf commented 4 years ago

:raised_hands: Thank you @rafaelremondes @brikis98 !

brikis98 commented 4 years ago

Fixed by @rafaelremondes in https://github.com/hashicorp/terraform-aws-consul/releases/tag/v0.7.7.