acm.py fails if DomainName is not set or is invalid #2405
Labels
bug
This issue/PR relates to a bug
waiting_on_contributor
Needs help. Feel free to engage to get things unblocked
Summary
Some background: I am working on adding multiple pre-existing Root CA Certificates to ACM as part of a project to consolidate where we store our Root CA Certificates and how we access them. Some of these Root CA Certificates have existed for a few years and it would be difficult to reissue them.
One of these Root CA Certificates has the domain_name field set to
-
. OpenSSL apparently allowed us to do this and ACM allows us to import the Certificate and it appears in the console to be valid according to ACM. Once this Certificate is pushed to ACM, however, all calls to ACM through acm.py fail:The issue goes away if line 193 (https://github.com/ansible-collections/amazon.aws/blob/main/plugins/module_utils/acm.py#L193) is updated to remove the reference to
DomainName
.I suspect that this Certificate's domain name is invalid, yet the ACM console has no issues importing, displaying, or pulling the Certificate once line 193 has been updated.
Issue Type
Bug Report
Component Name
acm.py
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
MacOS
Steps to Reproduce
First you need to import a Certificate into ACM with the domain name set to
-
.Next, the following task should fail:
Expected Results
I would not expect a KeyError.
Actual Results
I pasted this above.
Code of Conduct
The text was updated successfully, but these errors were encountered: