-
Notifications
You must be signed in to change notification settings - Fork 419
Open
Description
SUMMARY
When requesting for a certificate using the acm AWS module, there's an option to use either email validation or DNS validation.
When the DNS option is chosen, the describe certificate response is expected to have a ResourceRecord field, which has details of what to configure to allow domain validation (see "ResourceRecord" in the official AWS documentation).
However, this field is not available in the response from the community.aws.aws_acm_info module.
ISSUE TYPE
Bug ReportDocumentation Report (Ref to comment below: [aws_acm_info] DomainValidationOptions.ResourceRecord not Available in Response #321 (comment))
COMPONENT NAME
community.aws.aws_acm_info
ANSIBLE VERSION
ansible 2.10.3
config file = None
configured module search path = ['/path/to/home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.10.3/libexec/lib/python3.9/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.9.0 (default, Nov 14 2020, 10:50:03) [Clang 12.0.0 (clang-1200.0.32.27)]
CONFIGURATION
(empty output)
OS / ENVIRONMENT
- Running on macOS 11.0.1.
- Using local connection
STEPS TO REPRODUCE
- Request for a certificate from AWS ACM, and note the ARN (you may have to create this outside of this Ansible, using the
awsCLI. - Use the ARN from step 1 to fetch information using
community.aws.aws_acm_infomodule, and output it
# Task to request certificate via shell command (requires `aws` CLI)
- name: "Request for Certificate on ACM"
shell: |
aws acm request-certificate --domain-name "{{ domain_name }}" --validation-method "DNS"
environment:
AWS_ACCESS_KEY_ID: "{{ acm_aws_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ acm_aws_secret_key }}"
AWS_REGION: "{{ aws_default_region }}"
register: request_cert_result
# Inspect successful result
- name: "Inspect successful certificate result"
set_fact:
request_certificate_output: "{{ request_cert_result['stdout'] | from_json }}"
when:
request_cert_result is not failed
# Fetch certificate info
- name: "Fetch Certificate Information"
community.aws.aws_acm_info:
aws_access_key: "{{ acm_aws_access_key }}"
aws_secret_key: "{{ acm_aws_secret_key }}"
aws_region: "{{ aws_default_region }}"
certificate_arn: "{{ request_certificate_output.CertificateArn }}"EXPECTED RESULTS
- Expected the output of "Fetch Certificate Information" to have a
Resource Recordfield (similar to what's there for theaws describe-certificatecommand. (Seeaws describe-certificateresponse in screenshot below):
ACTUAL RESULTS
- Output did not have Resource Record field
See output in screenshot

