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

failed when using aws default key_id aws/ssm #1

Closed
jameszh opened this issue Apr 18, 2017 · 7 comments
Closed

failed when using aws default key_id aws/ssm #1

jameszh opened this issue Apr 18, 2017 · 7 comments
Labels

Comments

@jameszh
Copy link

jameszh commented Apr 18, 2017

looks like, with calling client.put_parameter, if you passed KeyId='aws/ssm', you will get InvalidKeyId
so in the case without key_id option or key_id is set 'aws/ssm', KeyId can't be present when making put_parameter call.

@ozbillwang
Copy link
Contributor

ozbillwang commented Apr 18, 2017

Could you please provide details include the error message first?

When you start to use SSM parameter store at the first time, kms key aws/ssm is created by aws as default.

If the key aws/ssm does not exist, you should provide the key_id in ansible task, remember to add alias in the key name.

- name: Create or update secure key/value pair with nominated kms key
  ssm_parameter_store:
    name: "Hello"
    description: "This is your first key"
    key_id: "alias/demo"
    string_type: "SecureString"
    value: "World"

@jameszh
Copy link
Author

jameszh commented Apr 18, 2017 via email

@ozbillwang
Copy link
Contributor

Could you confirm, in your environment, the kms key aws/ssm exists or not? if not, you need to create a kms key first.

https://www.terraform.io/docs/providers/aws/r/kms_key.html

@jameszh
Copy link
Author

jameszh commented Apr 18, 2017 via email

@ozbillwang
Copy link
Contributor

ozbillwang commented Apr 18, 2017

Seems I don't accept region as input, let me check.

@ozbillwang ozbillwang added the bug label Apr 18, 2017
@jameszh
Copy link
Author

jameszh commented Apr 19, 2017 via email

@ozbillwang
Copy link
Contributor

ozbillwang commented Apr 19, 2017

change default key_id from aws/ssm to alias/aws/ssm, it works on both regions.

The problem is fixed, thanks to raise this issue.

I have tagged release to v1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants