forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Tier as option to aws_ssm_parameter_store module (ansible-colle…
…ctions#305) * Added Tier as option * * added better description * added changelong Co-authored-by: Markus Bergholz <[email protected]> Co-authored-by: Mark Chappell <[email protected]>
- Loading branch information
1 parent
626657b
commit 4228c26
Showing
1 changed file
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,10 +65,21 @@ | |
choices: ['never', 'changed', 'always'] | ||
default: changed | ||
type: str | ||
tier: | ||
description: | ||
- Parameter store tier type. | ||
required: false | ||
choices: ['Standard', 'Advanced', 'Intelligent-Tiering'] | ||
default: Standard | ||
type: str | ||
version_added: 1.5.0 | ||
author: | ||
- Nathan Webster (@nathanwebsterdotme) | ||
- Bill Wang (@ozbillwang) <[email protected]> | ||
- Michael De La Rue (@mikedlr) | ||
- "Davinder Pal (@116davinder) <[email protected]>" | ||
- "Nathan Webster (@nathanwebsterdotme)" | ||
- "Bill Wang (@ozbillwang) <[email protected]>" | ||
- "Michael De La Rue (@mikedlr)" | ||
extends_documentation_fragment: | ||
- amazon.aws.aws | ||
- amazon.aws.ec2 | ||
|
@@ -111,6 +122,13 @@ | |
value: "Test1234" | ||
overwrite_value: "always" | ||
- name: Create or update key/value pair in aws parameter store with tier | ||
community.aws.aws_ssm_parameter_store: | ||
name: "Hello" | ||
description: "This is your first key" | ||
value: "World" | ||
tier: "Advanced" | ||
- name: recommend to use with aws_ssm lookup plugin | ||
ansible.builtin.debug: | ||
msg: "{{ lookup('amazon.aws.aws_ssm', 'hello') }}" | ||
|
@@ -157,7 +175,8 @@ def create_update_parameter(client, module): | |
args = dict( | ||
Name=module.params.get('name'), | ||
Value=module.params.get('value'), | ||
Type=module.params.get('string_type') | ||
Type=module.params.get('string_type'), | ||
Tier=module.params.get('tier') | ||
) | ||
|
||
if (module.params.get('overwrite_value') in ("always", "changed")): | ||
|
@@ -237,6 +256,7 @@ def setup_module_object(): | |
decryption=dict(default=True, type='bool'), | ||
key_id=dict(default="alias/aws/ssm"), | ||
overwrite_value=dict(default='changed', choices=['never', 'changed', 'always']), | ||
tier=dict(default='Standard', choices=['Standard', 'Advanced', 'Intelligent-Tiering']), | ||
) | ||
|
||
return AnsibleAWSModule( | ||
|