hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.71k stars 9.07k forks source link

[Bug]: I am trying to use enable_performance_insight attribute for DocumentDB, however the code does not pick that argument and is not enabling the attribute #28031

Open Vaibhavarora08 opened 1 year ago

Vaibhavarora08 commented 1 year ago

Terraform Core Version

01.2

AWS Provider Version

4.40.0

Affected Resource(s)

No response

Expected Behavior

When we add enable_performance_insight, the Terraform apply should pick that and enable the performance insight on AWS but that does not happen.

Actual Behavior

trying to use enable_performance_insight attribute for DocumentDB, however the code does not pick that argument and is not enabling the attribute

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_docdb_cluster_instance" "this" {
  count                        = var.cluster_size
  identifier                   = "${var.name}-instance-${count.index}"
  auto_minor_version_upgrade   = false
  cluster_identifier           = aws_docdb_cluster.this.id
  preferred_maintenance_window = "Sun:15:00-Sun:16:00" # 1:00 AM - 2:00 AM AEST
  instance_class               = var.instance_class
  ca_cert_identifier           = var.ca_cert_identifier
  apply_immediately            = true
  **enable_performance_insights  = true**
}

Steps to Reproduce

Try adding this attribute and see if it works

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

Vaibhavarora08 commented 1 year ago

Hi,

Can anyone please help on the above issue.

hlepesant commented 1 year ago

works for me with this versions :

$ terraform version
Terraform v1.3.6
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.45.0

plan:

  ~ resource "aws_docdb_cluster_instance" "instance" {
      + enable_performance_insights  = true
        id                           = "docdb-instance-01"
        # (many unchanged attributes hidden)
    }
Vaibhavarora08 commented 1 year ago

@hlepesant have you made any other changes as well apart from version?

hlepesant commented 1 year ago

Any. Juste terraform init -upgrade after comment all provider version's constraint