-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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]: Importing versioned SSM parameters broken since v5.50.0 #37812
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I was comparing log files on TRACE level for the provider versions 5.49.0 and 5.52.0 (the issue exists in provider versions >= 5.50.0). There was one difference in the requests send to AWS:
I did try out the impact of that difference using AWS CLI:
Maybe this helps to find the cause of the issue. |
I can reproduce this with an enhanced acceptance test: % make testacc TESTARGS='-run=TestAccSSMParameter_updateValue' PKG=ssm
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ssm/... -v -count 1 -parallel 20 -run=TestAccSSMParameter_updateValue -timeout 360m
=== RUN TestAccSSMParameter_updateValue
=== PAUSE TestAccSSMParameter_updateValue
=== CONT TestAccSSMParameter_updateValue
parameter_test.go:98: Step 5/5 error running import: exit status 1
Error: Cannot import non-existent remote object
While attempting to import an existing object to "aws_ssm_parameter.test",
the provider detected that no object exists with the given id. Only
pre-existing objects can be imported; check that the id is correct and that
it is associated with the provider's configured region or endpoint, or use
"terraform apply" to create a new remote object for this resource.
--- FAIL: TestAccSSMParameter_updateValue (40.39s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ssm 45.366s
FAIL
make: *** [testacc] Error 1 Relates #37481. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.53.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.5.7
AWS Provider Version
5.50.0
Affected Resource(s)
aws_ssm_parameter
Expected Behavior
Importing a versioned SSM parameter worked until provider version v5.50.0 but is broken now.
Running:
terraform import aws_ssm_parameter.my_param jwt-signing-secret-key:1
successfully imported the parameter, but executing it on v5.50.0 fails.Here's the output from v5.49.0:
Actual Behavior
Importing a versioned parameter fails. Output from v5.50.0:
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
provider "aws" {
region = "us-west-2"
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.51.1"
}
}
}
resource "aws_ssm_parameter" "my_param" {
name = "my-test-param"
type = "SecureString"
value = "bar"
}
Steps to Reproduce
Debug Output
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: