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

Terraform inconsistent behavior for aws_rds_cluster changes #1322

Closed
hashibot opened this issue Aug 3, 2017 · 4 comments
Closed

Terraform inconsistent behavior for aws_rds_cluster changes #1322

hashibot opened this issue Aug 3, 2017 · 4 comments
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.

Comments

@hashibot
Copy link

hashibot commented Aug 3, 2017

This issue was originally opened by @anosulchik as hashicorp/terraform#15715. It was migrated here as a result of the provider split. The original body of the issue is below.


We noticed that in case both availability_zones and db_subnet_group_name are specified for aws_rds_cluster then terraform tries to re-create cluster every time when we run terraform apply, even if no changes into resource config were made. Looks like we should allow only one parameter at a time.

    apply_immediately:                "" => "<computed>"
    availability_zones.#:             "3" => "2" (forces new resource)
    availability_zones.1305112097:    "us-east-1b" => "us-east-1b"
    availability_zones.3569565595:    "us-east-1a" => "us-east-1a"
    availability_zones.986537655:     "us-east-1c" => "" (forces new resource)
    backup_retention_period:          "35" => "35"
    cluster_identifier:               "tf-aurora-ecs-cluster-prod-cluster" => "tf-aurora-ecs-cluster-prod-cluster"
    cluster_identifier_prefix:        "" => "<computed>"
    cluster_members.#:                "1" => "<computed>"
    cluster_resource_id:              "cluster-xxx" => "<computed>"
    database_name:                    "" => "<computed>"
    db_cluster_parameter_group_name:  "tf-aurora-ecs-cluster-prod-cluster-params" => "tf-aurora-ecs-cluster-prod-cluster-params"
    db_subnet_group_name:             "shared-cluster-rds-prod" => "shared-cluster-rds-prod"
    endpoint:                         "tf-aurora-ecs-cluster-prod-cluster.cluster-cexkw116s3ng.us-east-1.rds.amazonaws.com" => "<computed>"
    engine:                           "aurora" => "<computed>"
    kms_key_id:                       "arn:aws:kms:us-east-1:xxx:key/xxx" => "<computed>"
    master_password:                  "<sensitive>" => "<sensitive>" (attribute changed)
    master_username:                  "root" => "root"
    port:                             "3306" => "<computed>"
    preferred_backup_window:          "01:00-03:30" => "01:00-03:30"
    preferred_maintenance_window:     "sat:04:00-sat:04:30" => "sat:04:00-sat:04:30"
    reader_endpoint:                  "tf-aurora-ecs-cluster-prod-cluster.cluster-ro-xxx.us-east-1.rds.amazonaws.com" => "<computed>"
    skip_final_snapshot:              "true" => "true"
    storage_encrypted:                "true" => "true"
    vpc_security_group_ids.#:         "1" => "1"
    vpc_security_group_ids.859373895: "sg-xxx" => "sg-xxx"```

Thank you!
@hashibot hashibot added the bug Addresses a defect in current functionality. label Aug 3, 2017
@bflad bflad added the service/rds Issues and PRs that pertain to the rds service. label Jan 28, 2018
@eschwartz
Copy link

I know this is an old issue, but does anyone have any information about what's going on here? Does RDS require that you always provide 3 availability zones?

@rottenbytes
Copy link

@eschwartz : You can circumvent this by not specifying the AZs but only the subnet group : since you will create that subnet group with subnet only in the AZs you selected it will use only those (I do it for 2 AZs im my staging environment). Small precision if relevant : I use aurora, but it should impact.

@bflad
Copy link
Contributor

bflad commented Oct 5, 2018

Hi everyone 👋 this has been answered in #1111 - please see that issue for more information.

@bflad bflad closed this as completed Oct 5, 2018
@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

No branches or pull requests

4 participants