aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.5k stars 3.85k forks source link

(ec2.CfnNetworkAclEntry): Invalid links to CloudFormation documentation #27171

Open hikarunakatani opened 12 months ago

hikarunakatani commented 12 months ago

Describe the issue

The CloudFormation documentation links embedded in the ec2.CfnNetworkAclEntry seem to be invalid and redirect to user guide page of Cloudformation.

class CfnNetworkAclEntry (construct) · AWS CDK https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNetworkAclEntry.html

Example link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkaclentry.html#cfn-ec2-networkaclentry-networkaclid

The correct link should be like this:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-networkaclid

Links

class CfnNetworkAclEntry (construct) · AWS CDK https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNetworkAclEntry.html

khushail commented 12 months ago

Hi @hikarunakatani , thanks for reaching out. Yes, this should be corrected.

peterwoodworth commented 12 months ago

The correct URL has been in the spec source for a while now. So, this seems to be on our end

https://github.com/aws/aws-cdk/blob/c695b6004219426cf0e67cbb92d916a394ddd594/packages/%40aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json#L6965

It seems to be an issue with cfnspec rather than just the docs. You can see the same incorrect docs link in the generated type file

export declare namespace CfnNetworkAclEntry {
    /**
     * Describes a range of ports.
     *
     * @struct
     * @stability external
     * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-portrange.html
     */

I'm not sure where this is handled. Since the link that it displays used to be what was in the CfnSpec, I suspect it failed to update for some reason.