Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-route53): HealthCheckConfigProperty missing RoutingControlArn #18570

Closed
gjmveloso opened this issue Jan 20, 2022 · 2 comments · Fixed by #18645
Closed

(aws-route53): HealthCheckConfigProperty missing RoutingControlArn #18570

gjmveloso opened this issue Jan 20, 2022 · 2 comments · Fixed by #18645
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1

Comments

@gjmveloso
Copy link

gjmveloso commented Jan 20, 2022

What is the problem?

The CfnHealthCheck.HealthCheckConfigProperty is missing the RoutingControlArn property.

According to Route 53 docs, the HealthCheckConfig contains a RoutingControlArn property

Reproduction Steps

new r53.CfnHealthCheck(this, 'HealthCheck', {
            healthCheckConfig: {
                type: 'RECOVERY_CONTROL',
                inverted: true,
                routingControlArn: routingControl.attrRoutingControlArn // causes error
            }
        });

What did you expect to happen?

Cfn* constructs generated from CloudFormation directly should be always stable and updated accordingly.

What actually happened?

TSError: ⨯ Unable to compile TypeScript:
lib/route53-arc.ts:132:17 - error TS2322: Type '{ type: string; inverted: true; routingControlArn: string; }' is not assignable to type 'IResolvable | HealthCheckConfigProperty'.
  Object literal may only specify known properties, and 'routingControlArn' does not exist in type 'IResolvable | HealthCheckConfigProperty'.

routingControlArn: routingControl.attrRoutingControlArn,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@aws-cdk/aws-route53/lib/route53.generated.d.ts:99:14
    readonly healthCheckConfig: CfnHealthCheck.HealthCheckConfigProperty | cdk.IResolvable;
             ~~~~~~~~~~~~~~~~~
    The expected type comes from property 'healthCheckConfig' which is declared here on type 'CfnHealthCheckProps'

CDK CLI Version

2.8.0 (build 8a5eb49)

Framework Version

1.139.0

Node.js Version

v16.13.2

OS

macOS 12.1

Language

Typescript

Language Version

4.5.5

Other information

No response

@gjmveloso gjmveloso added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 20, 2022
@github-actions github-actions bot added the @aws-cdk/aws-route53 Related to Amazon Route 53 label Jan 20, 2022
njlynch added a commit that referenced this issue Jan 25, 2022
The Route53 HealthCheckConfig structure is modeled in the CloudFormation spec as
a JSON blob, but it was previously modeled as an explicit structure (see
structure, as it's not updated with the Route53 spec. This adds the missing
RoutingControlArn to the structure.

fixes #18570
@njlynch njlynch added effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 25, 2022
@njlynch njlynch removed their assignment Jan 25, 2022
@njlynch
Copy link
Contributor

njlynch commented Jan 25, 2022

This structure is weird. Route53 used to model this explicitly in the CloudFormation spec, and then reverted and modeled it as just a JSON string. We made the decision to re-create the existing model, but that means our custom solution isn't automatically kept up to date with the rest of the CloudFormation spec (as there isn't an official spec for it). Instead, we get to manually update a patch file when a new field is added.

That being said, I've created the patch.

@mergify mergify bot closed this as completed in #18645 Jan 26, 2022
mergify bot pushed a commit that referenced this issue Jan 26, 2022
The Route53 HealthCheckConfig structure is modeled in the CloudFormation spec as
a JSON blob, but it was previously modeled as an explicit structure (see
structure, as it's not updated with the Route53 spec. This adds the missing
RoutingControlArn to the structure.

fixes #18570


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
The Route53 HealthCheckConfig structure is modeled in the CloudFormation spec as
a JSON blob, but it was previously modeled as an explicit structure (see
structure, as it's not updated with the Route53 spec. This adds the missing
RoutingControlArn to the structure.

fixes aws#18570


----

*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
@aws-cdk/aws-route53 Related to Amazon Route 53 bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants