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.73k stars 9.09k forks source link

[Bug]: aws_ssm_parameter doesn't manage insecure_value after import #37733

Open jinnko opened 3 months ago

jinnko commented 3 months ago

Terraform Core Version

1.6.1

AWS Provider Version

5.51.1

Affected Resource(s)

aws_ssm_parameter

Expected Behavior

Changes to insecure_value should be reflected in the resource when applied.

Actual Behavior

Plan shows an expected change, though reflected as known after apply rather than as the concrete change.

Apply doesn't affect any change of the resource.

Relevant Error/Panic Output Snippet

No errors are emitted and during the apply stage the resource is reported as `Modifying...` but no change is made.

Terraform Configuration Files

resource "aws_ssm_parameter" "param-a" {
  name        = "/shared-config/param-a"
  type        = "String"
  description = "Config for param-a"

  insecure_value = "value-a"
}

Steps to Reproduce

  1. Create a parameter via the AWS console
  2. Import the parameter with terraform import aws_ssm_parameter.param-a /shared-config/param-a
  3. Make a change to the value in the terraform code
  4. Plan and apply the terraform
  5. View the parameter in the AWS console and notice that no change was made

Debug Output

No response

Panic Output

No response

Important Factoids

  1. After import - the state contains insecure_value = null and the value is stored in the value field.

References

Related to https://github.com/hashicorp/terraform-provider-aws/issues/30350

Would you like to implement a fix?

No

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue