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

[Bug]: aws_rds_cluster Error: Provider produced inconsistent final plan #37883

Open
irizzant opened this issue Jun 7, 2024 · 4 comments
Open
Assignees
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/rds Issues and PRs that pertain to the rds service.

Comments

@irizzant
Copy link

irizzant commented Jun 7, 2024

Terraform Core Version

1.1.6

AWS Provider Version

5.53.0

Affected Resource(s)

  • aws_rds_cluster

Expected Behavior

I should be able to create the resource aws_rds_cluster with the provided configuration

Actual Behavior

I get an error.

I have also tried adding:
enable_local_write_forwarding = null

or
enable_local_write_forwarding = false

but I still get the error

Relevant Error/Panic Output Snippet

╷
│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for
│ module.esazione_db_cluster_dr.aws_rds_cluster.cluster to include new values
│ learned so far during apply, provider "registry.terraform.io/hashicorp/aws"
│ produced an invalid new value for .enable_local_write_forwarding: was
│ cty.False, but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

Terraform Configuration Files

resource "aws_rds_cluster" "cluster" {
  cluster_identifier              = var.name_cluster
  engine                          = "aurora-postgresql"
  engine_version                  = var.engine_version
  database_name                   = var.cross_region_replication_cluster ? null : substr(var.name_cluster, 1, -1)
  master_username                 = x
  master_password                 = x
  db_subnet_group_name            = aws_db_subnet_group.subnet_group.name
  db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.cluster_parameter_group.name
  backup_retention_period         = var.variable_per_environment[var.environment].backup_retantion
  storage_encrypted               = true
  skip_final_snapshot             = var.skip_final_snapshot
  preferred_maintenance_window    = var.preferred_maintenance_window
  vpc_security_group_ids          = var.aditional_security_group_id != "" ? [aws_security_group.security_group.id, var.aditional_security_group_id] : [aws_security_group.security_group.id]
  enabled_cloudwatch_logs_exports = ["postgresql"]
  deletion_protection             = var.deletion_protection
  apply_immediately               = var.apply_immediately
  allow_major_version_upgrade     = var.allow_major_version_upgrade
  global_cluster_identifier = var.global_cluster_identifier
  kms_key_id = var.cross_region_replication_cluster ? aws_kms_key.replica[0].arn : null
  lifecycle {
    ignore_changes = [global_cluster_identifier]
  }
  replication_source_identifier = var.replication_source_identifier
  domain = var.enable_kerberos ? var.domain_ad : null
  domain_iam_role_name = var.enable_kerberos ? aws_iam_role.cluster_iam_role.name : null
}

Steps to Reproduce

  • deploy the resource using the provided configuration and terraform version

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@irizzant irizzant added the bug Addresses a defect in current functionality. label Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/rds Issues and PRs that pertain to the rds service. label Jun 7, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 7, 2024
@irizzant
Copy link
Author

irizzant commented Jun 7, 2024

Update: the very same configuration with provider version 5.41.0 (the last before the additional enable_local_write_forwarding attribute was added) works fine

@justinretzolk justinretzolk added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 11, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 11, 2024
@johnsonaj johnsonaj self-assigned this Jun 12, 2024
@Felixlx
Copy link

Felixlx commented Jul 1, 2024

faced same issue,

@rajaie7
Copy link

rajaie7 commented Aug 2, 2024

This looks similar to #38578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

No branches or pull requests

5 participants