An ACM certificate with DNS validation causes the apply to hang on `aws_acm_certificate_validation` until timeout.
AdvancedTroubleshootingAuthentication and Cloud API Errors
Answer
Likely causes → Validation CNAMEs weren't created, were created in the wrong hosted zone (private zone, or a zone not delegated from the registrar), or CAA records block Amazon.
Diagnose →
aws acm describe-certificate --certificate-arn <arn> --query 'Certificate.DomainValidationOptions'
dig +short _abc123.api.example.com CNAME
dig +short NS example.com
Fix → Create the records in the public authoritative zone (for_each over domain_validation_options), fix delegation/CAA, then re-apply.
Prevent → Keep certificate + validation records in one module, and remember CloudFront certificates must be in us-east-1.
More on Authentication and Cloud API Errors
`Error: No valid credential sources found` followed by `no EC2 IMDS role found ... context deadline exceeded`.Beginner`Error: Cannot assume IAM Role` — `api error AccessDenied: User: arn:aws:iam::111111111111:user/ci is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::222222222222:role/terraform`.IntermediateGitHub Actions: `Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity`.IntermediateGitHub Actions log says `It looks like you might be trying to authenticate with OIDC. Did you mean to set the id-token permission?`BeginnerApplies that run longer than an hour fail with `ExpiredToken: The security token included in the request is expired`.Intermediate`InvalidClientTokenId: The security token included in the request is invalid.`Beginner