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

aws_ssm_parameter : arn output is incorrect #3263

Closed
awilkins opened this issue Feb 6, 2018 · 3 comments
Closed

aws_ssm_parameter : arn output is incorrect #3263

awilkins opened this issue Feb 6, 2018 · 3 comments
Labels
bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@awilkins
Copy link

awilkins commented Feb 6, 2018

Terraform Version

0.11.3

Affected Resource(s)

Please list the resources as a list, for example:

  • data : aws_ssm_parameter

Terraform Configuration Files

data "aws_ssm_parameter" "passphrase" {
  name = "/service/gpg/passphrase"
  with_decryption = false // The lambda is fetching it, not this
  // Don't return it decrypted, it will go in the state file!
}

Expected Behavior

ARN should match the same ARN that using e.g. aws-sdk SSM.getParameter() attempts to use.

Actual Behavior

ARN includes an extra slash compared to output from ssm calls

SSM says :

... not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:eu-west-1:<redacted>:parameter/service/gpg/passphrase

Currently trying to get to the bottom of why my lambda function can't do GetParameter here, thought it might be down to the extra slash in the policy document ARN but it's not.

I'm doing a replace() in the TF script to remove it anyway.

@awilkins
Copy link
Author

awilkins commented Feb 6, 2018

I note that the resource counterpart outputs the ARN without the additional slash.

@bflad bflad added bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service. labels Feb 6, 2018
@bflad
Copy link
Contributor

bflad commented Feb 6, 2018

Hi @awilkins! Sorry you ran into this. Indeed the aws_ssm_parameter data source was returning an extra slash in its arn attribute. We actually have a fix (#3211) that has been recently merged into master and will be included in v1.9.0 of the provider, expected to release at the end of this week. For that reason I'm going to close this ticket. 😄

PS for next time: please provide your AWS provider version as well in your issue reports via terraform version. Terraform was split into core and individual providers each on their own release cycle (we release every ~2 weeks), and if you look in our CHANGELOG we have a lot of enhancements/bug fixes each time so its helpful for the community/maintainers to have a frame of reference when investigating.

@bflad bflad closed this as completed Feb 6, 2018
@bflad bflad added this to the v1.9.0 milestone Feb 6, 2018
@ghost
Copy link

ghost commented Apr 8, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
Development

No branches or pull requests

2 participants