From ba2643d513e05eada257a27747ff72108a1a9526 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Tue, 14 Jan 2025 21:21:16 -0100 Subject: [PATCH] ACM: Resource Record name is slightly different for wildcard SAN's --- moto/acm/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moto/acm/models.py b/moto/acm/models.py index a963cd8273bb..b2aa1e4938ef 100644 --- a/moto/acm/models.py +++ b/moto/acm/models.py @@ -369,8 +369,11 @@ def describe(self) -> Dict[str, Any]: domain_name_status = "SUCCESS" if self.status == "ISSUED" else self.status for san in domain_names: + # https://docs.aws.amazon.com/acm/latest/userguide/dns-validation.html + # Record name usually follows the SAN - except when the SAN starts with an asterisk + rr_name = f"_d930b28be6c5927595552b219965053e.{san[2:] if san.startswith('*.') else san}." resource_record = { - "Name": f"_d930b28be6c5927595552b219965053e.{san}.", + "Name": rr_name, "Type": "CNAME", "Value": "_c9edd76ee4a0e2a74388032f3861cc50.ykybfrwcxw.acm-validations.aws.", }