-
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
Incorrect ARN output for aws_ssm_parameter #2593
Comments
Hi @jurajseffer, thanks for this bug report! It certainly looks like this is an issue since the ID will include the leading
I have submitted #2604 with the bugfix and enhanced testing. 😄 |
This is also broken for the aws_ssm_parameter data source: https://github.com/terraform-providers/terraform-provider-aws/blob/127a630a0d8ee1069556ed58f74ce650453a17c4/aws/data_source_aws_ssm_parameter.go#L75 |
Please reopen this issue as it still exists in aws_ssm_parameter data source as @jerthom described. |
The data source fix has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Terraform Version
Affected Resource(s)
aws_ssm_parameter
Terraform confg
ARN exported for this type of resource has a double slash (
//
) after the wordparameter
. I've tried creating a parameter without the leading slash but Terraform throws an AWS API error:aws_ssm_parameter.some_key: [ERROR] Error creating SSM parameter: ValidationException: Parameter name must be a fully qualified name.
The double slash is a problem because when I include the ARN into a policy for an IAM role, I get "unauthorized" response from AWS. Permissions work once one of the slashes is manually removed.
Perhaps this is caused by the trailing slash after
parameter
in https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_ssm_parameter.go#L94The obvious workaround is to manually construct the ARN or use
replace
function.The text was updated successfully, but these errors were encountered: