boto3_secretsmanager¶
Manage AWS Secrets Manager secrets with boto3.¶
Create and optionally update secrets in AWS Secrets Manager. Secret values are accepted through state data but are not included in state changes.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
This state module uses the boto3_secretsmanager execution module and the
standard AWS credential and profile configuration supported by that module.
Added in version 1.1.0.
- saltext.boto3.states.boto3_secretsmanager.__virtual__()[source]¶
Only load when the Secrets Manager execution module is available.
- saltext.boto3.states.boto3_secretsmanager.present(name, secret_string=None, secret_data=None, description=None, kms_key_id=None, tags=None, update=False, region=None, key=None, keyid=None, profile=None)[source]¶
Ensure a Secrets Manager secret exists, optionally updating its value.
- name (str):
Name or ARN of the secret.
- secret_string (str):
String value for the secret. Mutually exclusive with
secret_data.- secret_data (dict):
JSON-serializable data to serialize as the secret value. Mutually exclusive with
secret_string.- description (str):
Optional description for a newly created secret.
- kms_key_id (str):
Optional KMS key ID or ARN used to encrypt a newly created secret.
- tags (dict):
Optional mapping of tag names to tag values for a newly created secret.
- update (bool):
If
True, store the requested value as a new version when the secret already exists. The default isFalse.- region (str):
AWS region where the secret is stored.
- key (str):
AWS access key ID.
- keyid (str):
AWS secret access key.
- profile (str):
AWS profile to use for the connection.
Example:
mysecret: boto3_secretsmanager.present: - secret_string: 'mysecretvalue' - description: 'My secret description' - kms_key_id: 'my-kms-key-id' - tags: Environment: 'production' - update: True - region: 'us-east-1' - key: 'my-access-key-id' - keyid: 'my-secret-access-key' - profile: 'my-aws-profile'
- saltext.boto3.states.boto3_secretsmanager.absent(name, region=None, key=None, keyid=None, profile=None)[source]¶
Ensure a Secrets Manager secret is absent.
- name (str):
Name or ARN of the secret.
- region (str):
AWS region where the secret is stored.
- key (str):
AWS access key ID.
- keyid (str):
AWS secret access key.
- profile (str):
AWS profile to use for the connection.
Example:
mysecret: boto3_secretsmanager.absent: - region: 'us-east-1' - key: 'my-access-key-id' - keyid: 'my-secret-access-key' - profile: 'my-aws-profile'