PARALLAX

acm_certificate

Upload and delete certificates in the AWS Certificate Manager service

Collection: community.aws

Full Name: community.aws.acm_certificate

Synopsis

Upload and delete certificates in the AWS Certificate Manager service

Parameters

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
certificatestr
certificate_arnstr
certificate_chainstr
debug_botocore_endpoint_logsboolfalse
domain_namestr
endpoint_urlstr
name_tagstr
private_keystr
profilestr
purge_tagsbooltrue
regionstr
secret_keystr
session_tokenstr
statestrpresent
tagsdict
validate_certsbooltrue

Example

yaml
- name: upload a self-signed certificate
  community.aws.acm_certificate:
    certificate: "{{ lookup('file', 'cert.pem' ) }}"
    privateKey: "{{ lookup('file', 'key.pem' ) }}"
    name_tag: my_cert # to be applied through an AWS tag as  "Name":"my_cert"
    region: ap-southeast-2 # AWS region

- name: create/update a certificate with a chain
  community.aws.acm_certificate:
    certificate: "{{ lookup('file', 'cert.pem' ) }}"
    private_key: "{{ lookup('file', 'key.pem' ) }}"
    name_tag: my_cert
    certificate_chain: "{{ lookup('file', 'chain.pem' ) }}"
    state: present
    region: ap-southeast-2
  register: cert_create

- name: delete the cert we just created
  community.aws.acm_certificate:
    name_tag: my_cert
    state: absent
    region: ap-southeast-2

- name: delete a certificate with a particular ARN
  community.aws.acm_certificate:
    certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/01234567-abcd-abcd-abcd-012345678901"
    state: absent
    region: ap-southeast-2

- name: delete all certificates with a particular domain name
  community.aws.acm_certificate:
    domain_name: acm.ansible.com
    state: absent
    region: ap-southeast-2

- name: add tags to an existing certificate with a particular ARN
  community.aws.acm_certificate:
    certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/01234567-abcd-abcd-abcd-012345678901"
    tags:
        Name: my_certificate
        Application: search
        Environment: development
    purge_tags: true
Search
    ↑ ↓ move↵ openesc close