Skip to content

fix(certificatemanager): exclude domain validation options when using dns validation#7941

Closed
tpunder wants to merge 1 commit intoaws:masterfrom
tpunder:certificatemanager-dns-validation-error-fix
Closed

fix(certificatemanager): exclude domain validation options when using dns validation#7941
tpunder wants to merge 1 commit intoaws:masterfrom
tpunder:certificatemanager-dns-validation-error-fix

Conversation

@tpunder
Copy link
Copy Markdown
Contributor

@tpunder tpunder commented May 12, 2020

Note: I have been having problems fully building aws-cdk locally so have not been able to fully test this beyond building and running the updated tests in aws-certificatemanager.

As of 2020-05-11 CloudFormation now returns a "ValidationDomain cannot be used with DNS validation" error for some regions (e.g. us-west-2, eu-central-1) if you try to specify DomainValidationOptions on a Certificate when ValidationMethod is DNS. This fixes #7933

This CloudFormation template now causes an error:

Resources:
  mysslcertF404C81B:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: www.example.com
      DomainValidationOptions:
        - DomainName: www.example.com
          ValidationDomain: example.com
      ValidationMethod: DNS

The correct template now excludes the DomainValidationOptions for DNS:

Resources:
  mysslcertF404C81B:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: www.example.com
      ValidationMethod: DNS

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

… dns validation

As of 2020-05-11 CloudFormation now returns a "ValidationDomain cannot be used with DNS validation" error for some regions (e.g. us-west-2, eu-central-1) if you try to specify DomainValidationOptions on a Certificate when ValidationMethod is DNS. This fixes aws#7933

This CloudFormation template now causes an error:

Resources:
  mysslcertF404C81B:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: www.example.com
      DomainValidationOptions:
        - DomainName: www.example.com
          ValidationDomain: example.com
      ValidationMethod: DNS

The correct template now excludes the DomainValidationOptions for DNS:

Resources:
  mysslcertF404C81B:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: www.example.com
      ValidationMethod: DNS
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: d94aa22
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix @tpunder, it's great! However, let's hold out on this change for now. We're discussing whether the CloudFormation change is actually correct with the team. Let's see what happens with that discussion.

Putting in "Request changes" for now.

@tpunder
Copy link
Copy Markdown
Contributor Author

tpunder commented May 13, 2020

@skinny85 Sounds good. I would argue that the CloudFormation change is not a good idea since it breaks existing templates. I was able to verify that this PR solves my problem.

jogold added a commit to jogold/aws-cdk that referenced this pull request Jun 15, 2020
…icate

Automatically adding Amazon Route 53 CNAME records for DNS validation is
now natively supported by CloudFormation.

Add a `validation` prop to `Certificate` to handle both email and DNS
validation. Deprecate `DnsValidatedCertificate`.

The default remains email validation (non-breaking).

Closes aws#5831
Closes aws#5835
Closes aws#6081
Closes aws#6516
Closes aws#7150
Closes aws#7941
Closes aws#7995
Closes aws#7996
jogold added a commit to jogold/aws-cdk that referenced this pull request Jun 15, 2020
…cate

Automatically adding Amazon Route 53 CNAME records for DNS validation is
now natively supported by CloudFormation.

Add a `validation` prop to `Certificate` to handle both email and DNS
validation. Deprecate `DnsValidatedCertificate`.

The default remains email validation (non-breaking).

Closes aws#5831
Closes aws#5835
Closes aws#6081
Closes aws#6516
Closes aws#7150
Closes aws#7941
Closes aws#7995
Closes aws#7996
@mergify mergify bot closed this in #8552 Jul 10, 2020
mergify bot pushed a commit that referenced this pull request Jul 10, 2020
…cate (#8552)

Automatically adding Amazon Route 53 CNAME records for DNS validation is
now natively supported by CloudFormation.

Add a `validation` prop to `Certificate` to handle both email and DNS
validation. `DnsValidatedCertificate` is now only useful for cross-region
certificate creation.

The default remains email validation (non-breaking).

Closes #5831
Closes #5835
Closes #6081
Closes #6516
Closes #7150
Closes #7941
Closes #7995
Closes #7996
Closes #8282 
Closes #8659
Closes #8783

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CloudFormation Error using Certificate in some regions: "ValidationDomain cannot be used with DNS validation"

3 participants