diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 3659c17430459..3f22dda39e4f4 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -361,7 +361,8 @@ integTest('doubly nested stack', await fixture.cdkDeploy('with-doubly-nested-stack', { captureStderr: false, }); - })); + }), +); integTest( 'nested stack with parameters', @@ -404,7 +405,7 @@ integTest( ); expect(response.Stacks?.[0].StackStatus).toEqual('REVIEW_IN_PROGRESS'); - //verify a change set was created with the provided name + // verify a change set was created with the provided name const changeSetResponse = await fixture.aws.cloudFormation.send( new ListChangeSetsCommand({ StackName: stackArn, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.bastion-host-disable-al2023-feature-flag.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.bastion-host-disable-al2023-feature-flag.ts index dc6dfe2cb3134..d91b0333a393a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.bastion-host-disable-al2023-feature-flag.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.bastion-host-disable-al2023-feature-flag.ts @@ -14,7 +14,7 @@ const app = new cdk.App(); class TestStack extends cdk.Stack { constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); - this.node.setContext(BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, false); //disable feature flag + this.node.setContext(BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, false); // disable feature flag const vpc = new ec2.Vpc(this, 'VPC'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.loggroupclass.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.loggroupclass.ts index 2af207e0cc26a..c76cdf5ead1f6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.loggroupclass.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.loggroupclass.ts @@ -51,7 +51,7 @@ const describeInfrequentAccess = integTest.assertions.awsApiCall('CloudWatchLogs logGroupNamePrefix: logGroupInfrequentAccess.logGroupName, }); -//valdiate +// valdiate describeInfrequentAccess.expect(ExpectedResult.objectLike({ logGroups: [ { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/bedrock/integ.invoke-model.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/bedrock/integ.invoke-model.ts index a0f2118867e1e..585c159a2fb58 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/bedrock/integ.invoke-model.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/bedrock/integ.invoke-model.ts @@ -71,7 +71,7 @@ const prompt3 = new BedrockInvokeModel(stack, 'Prompt3', { }); /** Test for Bedrock s3 URI Path */ -//State Machine Execution will fail for the following input as it expects a valid s3 URI from previous prompt +// State Machine Execution will fail for the following input as it expects a valid s3 URI from previous prompt const prompt4 = new BedrockInvokeModel(stack, 'Prompt4', { model, input: { s3InputUri: '$.names' }, @@ -144,7 +144,7 @@ const llamaPrompt3 = new BedrockInvokeModel(stack, 'LlamaPrompt3', { }); /** Test for Bedrock s3 URI Path */ -//State Machine Execution will fail for the following input as it expects a valid s3 URI from previous prompt +// State Machine Execution will fail for the following input as it expects a valid s3 URI from previous prompt const llamaModel4 = bedrock.FoundationModel.fromFoundationModelId(stack, 'LlamaModel4', bedrock.FoundationModelIdentifier.META_LLAMA_3_2_90B_INSTRUCT_V1); const llamaPrompt4 = new BedrockInvokeModel(stack, 'LlamaPrompt4', { model: llamaModel4, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.state-machine-and-activity-cmk.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.state-machine-and-activity-cmk.ts index cd36085aced87..dfad2fa5527b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.state-machine-and-activity-cmk.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.state-machine-and-activity-cmk.ts @@ -47,7 +47,7 @@ const testCase = new IntegTest(app, 'StateMachineAndActivityWithCMKEncryptionCon testCases: [stack], }); -//Start execution +// Start execution const start = testCase.assertions.awsApiCall('StepFunctions', 'startExecution', { stateMachineArn: stack.stateMachine.stateMachineArn, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts index 03bc6efb2ca7c..5a3de14796142 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/core/test/integ.cfn-mappings-find-in-map.ts @@ -4,7 +4,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; const app = new cdk.App(); -const stack = new cdk.Stack(app, 'core-cfn-mapping-1'/*,{ env }*/); +const stack = new cdk.Stack(app, 'core-cfn-mapping-1'/* ,{ env }*/); const backing = { TopLevelKey1: { diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts index 5e5fb0f38fe60..f7c47e0932a05 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts @@ -344,7 +344,7 @@ class IpamPool extends Resource implements IIpamPool { throw new Error('awsService is required when addressFamily is set to ipv6'); } - //Add tags to the IPAM Pool if name is provided + // Add tags to the IPAM Pool if name is provided if (props.ipamPoolName) { Tags.of(this).add(NAME_TAG, props.ipamPoolName); } diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/route.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/route.ts index 19d333532ff04..3a95a0d9d8264 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/route.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/route.ts @@ -720,7 +720,7 @@ export class Route extends Resource implements IRouteV2 { this.destination = props.destination; const isDestinationIpv4 = NetworkUtils.validIp(props.destination); if (!isDestinationIpv4) { - //TODO Validate for IPv6 CIDR range + // TODO Validate for IPv6 CIDR range this.destinationIpv6Cidr = props.destination; } else { this.destinationIpv4Cidr = props.destination; @@ -742,7 +742,7 @@ export class Route extends Resource implements IRouteV2 { } this.node.defaultChild = this.resource; - //Create a route only after target gateway or endpoint is created + // Create a route only after target gateway or endpoint is created if (this.target.gateway) { this.node.addDependency(this.target.gateway); } diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts index 2a1348c923d5d..41753b25403d9 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts @@ -259,7 +259,7 @@ export class SubnetV2 extends Resource implements ISubnetV2 { overlap = validateOverlappingCidrRanges(props.vpc, props.ipv4CidrBlock.cidr); - //check whether VPC supports ipv6 + // check whether VPC supports ipv6 if (props.ipv6CidrBlock?.cidr) { validateSupportIpv6(props.vpc); overlapIpv6 = validateOverlappingCidrRangesipv6(props.vpc, props.ipv6CidrBlock?.cidr); diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/util.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/util.ts index 7dbdac93c30f6..56baeecc83e1e 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/util.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/util.ts @@ -1,4 +1,4 @@ -/*eslint no-bitwise: ["error", { "allow": ["~", "|", "<<", "&"] }] */ +/* eslint no-bitwise: ["error", { "allow": ["~", "|", "<<", "&"] }] */ import { ISubnet } from 'aws-cdk-lib/aws-ec2'; diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts index b39b72ee8c04d..d3dbc81316b1d 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts @@ -501,7 +501,7 @@ export abstract class VpcV2Base extends Resource implements IVpcV2 { routeName: 'CDKDefaultIPv6Route', }); } - //Add default route to IGW for IPv4 + // Add default route to IGW for IPv4 new Route(this, `${subnet.node.id}-DefaultRoute`, { routeTable: subnet.routeTable, destination: options?.ipv4Destination ?? '0.0.0.0/0', diff --git a/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2.ts b/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2.ts index d9ed358706d1f..e7090a1b3b60f 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2.ts @@ -504,7 +504,7 @@ export class VpcV2 extends VpcV2Base { this.dnsSupportEnabled = props.enableDnsSupport == null ? true : props.enableDnsSupport; const instanceTenancy = props.defaultInstanceTenancy || 'default'; this.resource = new CfnVPC(this, 'Resource', { - cidrBlock: vpcOptions.ipv4CidrBlock, //for Ipv4 addresses CIDR block + cidrBlock: vpcOptions.ipv4CidrBlock, // for Ipv4 addresses CIDR block enableDnsHostnames: this.dnsHostnamesEnabled, enableDnsSupport: this.dnsSupportEnabled, ipv4IpamPoolId: vpcOptions.ipv4IpamPool?.ipamPoolId, // for Ipv4 ipam option @@ -526,7 +526,7 @@ export class VpcV2 extends VpcV2Base { }, this.stack); this.region = this.stack.region; this.ownerAccountId = this.stack.account; - //Add tag to the VPC with the name provided in properties + // Add tag to the VPC with the name provided in properties Tags.of(this).add(NAME_TAG, props.vpcName || this.node.path); if (props.secondaryAddressBlocks) { const secondaryAddressBlocks: IIpAddresses[] = props.secondaryAddressBlocks; @@ -541,7 +541,7 @@ export class VpcV2 extends VpcV2Base { if (secondaryVpcOptions.amazonProvided || secondaryVpcOptions.ipv6IpamPool || secondaryVpcOptions.ipv6PoolId) { this.useIpv6 = true; } - //validate CIDR ranges per RFC 1918 + // validate CIDR ranges per RFC 1918 if (secondaryVpcOptions.ipv4CidrBlock!) { const ret = validateIpv4address(secondaryVpcOptions.ipv4CidrBlock, this.resource.cidrBlock); if (ret === false) { @@ -559,9 +559,9 @@ export class VpcV2 extends VpcV2Base { ipv6NetmaskLength: secondaryVpcOptions.ipv6NetmaskLength, ipv6IpamPoolId: secondaryVpcOptions.ipv6IpamPool?.ipamPoolId, amazonProvidedIpv6CidrBlock: secondaryVpcOptions.amazonProvided, - //BYOIP IPv6 Address + // BYOIP IPv6 Address ipv6CidrBlock: secondaryVpcOptions?.ipv6CidrBlock, - //BYOIP Pool for IPv6 address + // BYOIP Pool for IPv6 address ipv6Pool: secondaryVpcOptions?.ipv6PoolId, }); if (secondaryVpcOptions.dependencies) { @@ -569,7 +569,7 @@ export class VpcV2 extends VpcV2Base { vpcCidrBlock.node.addDependency(dep); } } - //Create secondary blocks for Ipv4 and Ipv6 + // Create secondary blocks for Ipv4 and Ipv6 this.secondaryCidrBlock?.push(vpcCidrBlock); } } @@ -826,7 +826,7 @@ class VPCCidrBlock extends Resource implements IVPCCidrBlock { public readonly amazonProvidedIpv6CidrBlock ?: boolean = props.amazonProvidedIpv6CidrBlock; public readonly ipv6IpamPoolId ?: string = props.ipv6IpamPoolId; public readonly ipv4IpamPoolId ?: string = props.ipv4IpamPoolId; - //BYOIP Pool Attributes + // BYOIP Pool Attributes public readonly ipv6Pool?: string = props.ipv6Pool; public readonly ipv6CidrBlock?: string = props.ipv6CidrBlock; } @@ -855,13 +855,13 @@ class VPCCidrBlock extends Resource implements IVPCCidrBlock { this.ipv6IpamPoolId = props.ipv6IpamPoolId; this.ipv4IpamPoolId = props.ipv4IpamPoolId; this.amazonProvidedIpv6CidrBlock = props.amazonProvidedIpv6CidrBlock; - //BYOIP Pool and CIDR Block + // BYOIP Pool and CIDR Block this.ipv6CidrBlock = props.ipv6CidrBlock; this.ipv6Pool = props.ipv6Pool; } } -//@internal First two Octet to verify RFC 1918 +// @internal First two Octet to verify RFC 1918 interface IPaddressConfig { octet1: number; octet2: number; diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.byoip-ipv6.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.byoip-ipv6.ts index 03338ef5ee674..6c355dd295964 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.byoip-ipv6.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.byoip-ipv6.ts @@ -21,9 +21,9 @@ const myVpc = new vpc_v2.VpcV2(stack, 'VPC-integ-test-1', { primaryAddressBlock: vpc_v2.IpAddresses.ipv4('10.1.0.0/16'), secondaryAddressBlocks: [ vpc_v2.IpAddresses.ipv6ByoipPool({ - ipv6PoolId: 'ipv6pool-ec2-0a95217e154b65493', //To Be Replaced + ipv6PoolId: 'ipv6pool-ec2-0a95217e154b65493', // To Be Replaced cidrBlockName: 'MyByoipIpv6Block', - ipv6CidrBlock: '2600:f0f0:8::/56', //To Be Replaced + ipv6CidrBlock: '2600:f0f0:8::/56', // To Be Replaced }), ], enableDnsHostnames: true, @@ -33,7 +33,7 @@ const myVpc = new vpc_v2.VpcV2(stack, 'VPC-integ-test-1', { new SubnetV2(stack, 'Subnet-integ-test-1', { vpc: myVpc, ipv4CidrBlock: new IpCidr('10.1.1.0/24'), - ipv6CidrBlock: new IpCidr('2600:f0f0:8:1::/64'), //To Be Replaced + ipv6CidrBlock: new IpCidr('2600:f0f0:8:1::/64'), // To Be Replaced availabilityZone: 'us-west-2a', subnetType: SubnetType.PRIVATE_ISOLATED, }); @@ -44,7 +44,7 @@ new SubnetV2(stack, 'Subnet-integ-test-1', { new SubnetV2(stack, 'Subnet-integ-test-2', { vpc: myVpc, ipv4CidrBlock: new IpCidr('10.1.0.0/24'), - ipv6CidrBlock: new IpCidr('2600:f0f0:8:0::/64'), //To Be Replaced + ipv6CidrBlock: new IpCidr('2600:f0f0:8:0::/64'), // To Be Replaced availabilityZone: 'us-west-2a', subnetType: SubnetType.PRIVATE_ISOLATED, }); diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.ipam.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.ipam.ts index 87d44d8633fce..e13177bc9d731 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.ipam.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.ipam.ts @@ -26,7 +26,7 @@ const ipam = new Ipam(stack, 'IpamTest', { operatingRegion: ['us-west-2'], }); -/**Test Ipam Pool Ipv4 */ +/** Test Ipam Pool Ipv4 */ const pool1 = ipam.privateScope.addPool('PrivatePool0', { addressFamily: AddressFamily.IP_V4, @@ -70,8 +70,8 @@ new SubnetV2(stack, 'testsbubnet', { vpc, availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.0.0.0/24'), - //defined on the basis of allocation done in IPAM console - //ipv6CidrBlock: new Ipv6Cidr('2a05:d02c:25:4000::/60'), + // defined on the basis of allocation done in IPAM console + // ipv6CidrBlock: new Ipv6Cidr('2a05:d02c:25:4000::/60'), subnetType: SubnetType.PRIVATE_ISOLATED, }); diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.peering-cross-account.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.peering-cross-account.ts index 8bc4524f78ddb..f6efb1ff733b0 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.peering-cross-account.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.peering-cross-account.ts @@ -51,7 +51,7 @@ class AcceptorStack extends cdk.Stack { primaryAddressBlock: vpc_v2.IpAddresses.ipv4('10.0.0.0/16'), }); - //Same account VPC peering + // Same account VPC peering const requestorVpc = new vpc_v2.VpcV2(this, 'requestorVpcSameAccount', { primaryAddressBlock: vpc_v2.IpAddresses.ipv4('10.1.0.0/16'), }); @@ -60,7 +60,7 @@ class AcceptorStack extends cdk.Stack { acceptorVpc: acceptorVpc, }); - //For cross-account peering connection + // For cross-account peering connection acceptorVpc.createAcceptorVpcRole(account); } } @@ -69,9 +69,9 @@ class RequestorStack extends cdk.Stack { constructor(scope: Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); - //Import acceptorVpc into the requestor stack, change vpcId after vpc is created using acceptorStack definition + // Import acceptorVpc into the requestor stack, change vpcId after vpc is created using acceptorStack definition const acceptorVpc = vpc_v2.VpcV2.fromVpcV2Attributes(this, 'acceptorVpc', { - //Replace VPC Id before running integ test again + // Replace VPC Id before running integ test again vpcId: 'vpc-09b9235d8a3195ba3', vpcCidrBlock: '10.0.0.0/16', region: 'us-east-1', diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.subnet-v2.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.subnet-v2.ts index eaa7df1baa667..134ce8ac086da 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.subnet-v2.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.subnet-v2.ts @@ -37,12 +37,12 @@ new SubnetV2(stack, 'testSubnet1', { vpc, availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.1.0.0/20'), - //defined on the basis of allocation done in IPAM console - //ipv6CidrBlock: new Ipv6Cidr('2a05:d02c:25:4000::/60'), + // defined on the basis of allocation done in IPAM console + // ipv6CidrBlock: new Ipv6Cidr('2a05:d02c:25:4000::/60'), subnetType: SubnetType.PRIVATE_ISOLATED, }); -/**Test compatibility with existing construct */ +/** Test compatibility with existing construct */ new ec2.Instance(stack, 'Instance', { vpc, instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MICRO), diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.test-import.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.test-import.ts index a3807b66896ce..75fcfe36ff6db 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.test-import.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.test-import.ts @@ -20,7 +20,7 @@ const stack = new cdk.Stack(app, 'vpcv2-import-integ-test', { * according to the one alloted on creation */ const imported_new_vpc = VpcV2.VpcV2.fromVpcV2Attributes(stack, 'ImportedNewVPC', { - vpcId: 'vpc-08193db3ccc4f909f', //VPC id + vpcId: 'vpc-08193db3ccc4f909f', // VPC id vpcCidrBlock: '10.1.0.0/16', secondaryCidrBlocks: [{ cidrBlock: '10.2.0.0/16', @@ -34,11 +34,11 @@ const imported_new_vpc = VpcV2.VpcV2.fromVpcV2Attributes(stack, 'ImportedNewVPC' }], subnets: [{ subnetName: 'IsolatedSubnet2', - subnetId: 'subnet-03cd773c0fe08ed26', //Subnet Id + subnetId: 'subnet-03cd773c0fe08ed26', // Subnet Id subnetType: SubnetType.PRIVATE_ISOLATED, availabilityZone: 'us-west-2a', ipv4CidrBlock: '10.2.0.0/24', - routeTableId: 'rtb-0871c310f98da2cbb', //RouteTable id + routeTableId: 'rtb-0871c310f98da2cbb', // RouteTable id }, { subnetId: 'subnet-0fa477e01db27d820', subnetType: SubnetType.PUBLIC, @@ -48,22 +48,22 @@ const imported_new_vpc = VpcV2.VpcV2.fromVpcV2Attributes(stack, 'ImportedNewVPC' }], }); -//Test to add new subnet to imported VPC against secondary range +// Test to add new subnet to imported VPC against secondary range new SubnetV2(stack, 'AddnewImportedSubnet', { availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.2.2.0/24'), - //can be uncommented and modified after allocation is done using Amazon Provided Ipv6 - //ipv6CidrBlock: new IpCidr('2600:1f14:b1d:6500::/64'), + // can be uncommented and modified after allocation is done using Amazon Provided Ipv6 + // ipv6CidrBlock: new IpCidr('2600:1f14:b1d:6500::/64'), vpc: imported_new_vpc, subnetType: SubnetType.PUBLIC, }); -//Test to add new subnet to imported VPC against secondary range +// Test to add new subnet to imported VPC against secondary range new SubnetV2(stack, 'AddnewImportedSubnet2', { availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.3.2.0/24'), - //can be uncommented and modified after allocation is done using Amazon Provided Ipv6 - //ipv6CidrBlock: new IpCidr('2600:1f14:b1d:6500::/64'), + // can be uncommented and modified after allocation is done using Amazon Provided Ipv6 + // ipv6CidrBlock: new IpCidr('2600:1f14:b1d:6500::/64'), vpc: imported_new_vpc, subnetType: SubnetType.PUBLIC, }); @@ -76,7 +76,7 @@ const ImportedSubnet = SubnetV2.fromSubnetV2Attributes(stack, 'IsolatedSubnet1', routeTableId: 'rtb-0f02fab3ed3fb4ba9', }); -//Test to add different types of gateways +// Test to add different types of gateways imported_new_vpc.addInternetGateway(); imported_new_vpc.addNatGateway({ @@ -101,14 +101,14 @@ const ipamvpc = VpcV2.VpcV2.fromVpcV2Attributes(stack, 'ImportedIPAMVPC', { }], }); -//Test to add different types of gateways +// Test to add different types of gateways ipamvpc.addEgressOnlyInternetGateway(); -//Test to add new subnet to imported VPC against IPAM range +// Test to add new subnet to imported VPC against IPAM range new SubnetV2(stack, 'AddnewSubnettoImportedIpam', { availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.2.1.0/28'), - //can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 + // can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 ipv6CidrBlock: new IpCidr('2600:1f24:6c:4000::/64'), vpc: ipamvpc, subnetType: SubnetType.PUBLIC, diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-alpha.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-alpha.ts index 24eb82241ddc4..26e42e24b4688 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-alpha.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-alpha.ts @@ -26,7 +26,7 @@ const vpc = new vpc_v2.VpcV2(stack, 'VPC-integ-test-1', { vpc_v2.IpAddresses.ipv4('10.2.0.0/16', { cidrBlockName: 'SecondaryAddress2', }), - //Test Amazon provided secondary ipv6 address + // Test Amazon provided secondary ipv6 address vpc_v2.IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonProvided', }), @@ -49,34 +49,34 @@ new SubnetV2(stack, 'testsubnet', { vpc, availabilityZone: 'us-west-2b', ipv4CidrBlock: new IpCidr('10.2.0.0/24'), - //Test secondary ipv6 address after Amazon Provided ipv6 allocation - //ipv6CidrBlock: new Ipv6Cidr('2001:db8:1::/64'), + // Test secondary ipv6 address after Amazon Provided ipv6 allocation + // ipv6CidrBlock: new Ipv6Cidr('2001:db8:1::/64'), subnetType: SubnetType.PRIVATE_ISOLATED, }); -//Validate ipv6 IPAM +// Validate ipv6 IPAM new SubnetV2(stack, 'validateIpv6', { vpc, ipv4CidrBlock: new IpCidr('10.3.0.0/24'), availabilityZone: 'us-west-2b', - //Test secondary ipv6 address after Amazon Provided ipv6 allocation - //ipv6CidrBlock: new IpCidr('2600:1f14:3283:9501::/64'), + // Test secondary ipv6 address after Amazon Provided ipv6 allocation + // ipv6CidrBlock: new IpCidr('2600:1f14:3283:9501::/64'), subnetType: SubnetType.PUBLIC, }); -//Test to add Gateway Endpoint +// Test to add Gateway Endpoint vpc.addGatewayEndpoint('TestGWendpoint', { service: GatewayVpcEndpointAwsService.S3, subnets: [{ subnetType: SubnetType.PUBLIC }], }); -//Test to add Interface Endpoint +// Test to add Interface Endpoint vpc.addInterfaceEndpoint('TestInterfaceEndpoint', { service: InterfaceVpcEndpointAwsService.SNS, subnets: { subnetType: SubnetType.PRIVATE_ISOLATED }, }); -//Add an Egress only Internet Gateway +// Add an Egress only Internet Gateway vpc.addEgressOnlyInternetGateway({ subnets: [{ subnetType: SubnetType.PUBLIC }], }); @@ -86,7 +86,7 @@ const vpnGateway = vpc.enableVpnGatewayV2({ type: VpnConnectionType.IPSEC_1, }); -//Can define a route with VPN gateway as a target +// Can define a route with VPN gateway as a target const routeTable = new RouteTable(stack, 'routeTable', { vpc } ); new Route(stack, 'route', { @@ -95,18 +95,18 @@ new Route(stack, 'route', { routeTable: routeTable, }); -//Add Internet Gateway with routes set to custom IP range +// Add Internet Gateway with routes set to custom IP range vpc.addInternetGateway({ ipv4Destination: '192.168.0.0/16', }); -//Add a NAT Gateway +// Add a NAT Gateway vpc.addNatGateway({ subnet: subnet, connectivityType: NatConnectivityType.PRIVATE, }).node.addDependency(vpnGateway); -//Can define a route with Nat gateway as a target +// Can define a route with Nat gateway as a target routeTable.addRoute( 'NATGWRoute', '172.32.0.0/24', { gateway: vpnGateway }); new IntegTest(app, 'integtest-model', { diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-tagging.ts b/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-tagging.ts index ceecbda97dc59..ccd1bf3a23053 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-tagging.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/integ.vpc-v2-tagging.ts @@ -13,7 +13,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-ec2-alpha-tag'); const vpc = new vpc_v2.VpcV2(stack, 'VPC-integ-test-tag', { primaryAddressBlock: vpc_v2.IpAddresses.ipv4('10.1.0.0/16'), secondaryAddressBlocks: [ - //Test Amazon provided secondary ipv6 address + // Test Amazon provided secondary ipv6 address vpc_v2.IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonProvided', }), diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/ipam.test.ts b/packages/@aws-cdk/aws-ec2-alpha/test/ipam.test.ts index 78e681c5dc0f5..68a4343b9be2a 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/ipam.test.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/ipam.test.ts @@ -48,7 +48,7 @@ describe('IPAM Test', () => { }, Locale: 'us-west-2', }, - ); //End Template + ); // End Template }); // End Test test('Creates IP Pool under Private Scope', () => { @@ -76,7 +76,7 @@ describe('IPAM Test', () => { }, Locale: 'us-west-2', }, - ); //End Template + ); // End Template }); test('Creates IPAM CIDR pool under public scope for IPv6', () => { diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/route.test.ts b/packages/@aws-cdk/aws-ec2-alpha/test/route.test.ts index 0428e3458e352..cdc68419ff9d7 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/route.test.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/route.test.ts @@ -551,7 +551,7 @@ describe('VPCPeeringConnection', () => { test('Creates a cross account VPC peering connection', () => { const importedVpcB = vpc.VpcV2.fromVpcV2Attributes(stackA, 'VpcB', { - vpcId: 'mockVpcBId', //cross account stack references are not supported + vpcId: 'mockVpcBId', // cross account stack references are not supported vpcCidrBlock: '10.2.0.0/16', region: vpcB.env.region, ownerAccountId: '123456789012', @@ -577,7 +577,7 @@ describe('VPCPeeringConnection', () => { test('Creates a cross region VPC peering connection', () => { const importedVpcC = vpc.VpcV2.fromVpcV2Attributes(stackA, 'VpcB', { - vpcId: 'mockVpcCId', //cross account stack references are not supported + vpcId: 'mockVpcCId', // cross account stack references are not supported vpcCidrBlock: '10.3.0.0/16', region: vpcC.env.region, ownerAccountId: '123456789012', diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/vpc-add-method.test.ts b/packages/@aws-cdk/aws-ec2-alpha/test/vpc-add-method.test.ts index 2e6f64caa20d5..353b6029969e3 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/vpc-add-method.test.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/vpc-add-method.test.ts @@ -73,7 +73,7 @@ describe('Vpc V2 with full control', () => { vpc: vpc1, ipv4CidrBlock: new IpCidr('10.1.0.0/24'), availabilityZone: 'ap-south-1b', - //Test secondary ipv6 address after IPAM pool creation + // Test secondary ipv6 address after IPAM pool creation ipv6CidrBlock: new IpCidr('2001:db8::/48'), subnetType: SubnetType.PRIVATE_ISOLATED, }); @@ -318,7 +318,7 @@ describe('Vpc V2 with full control', () => { ipv6Destination: '2001:db8::/48', }); const template = Template.fromStack(stack); - //Route for custom IPv4 destination + // Route for custom IPv4 destination template.hasResourceProperties('AWS::EC2::Route', { GatewayId: { 'Fn::GetAtt': ['TestVpcInternetGatewayIGW4C825874', 'InternetGatewayId'], @@ -328,7 +328,7 @@ describe('Vpc V2 with full control', () => { }, DestinationCidrBlock: '203.0.113.25', }); - //Route for custom IPv6 destination + // Route for custom IPv6 destination template.hasResourceProperties('AWS::EC2::Route', { GatewayId: { 'Fn::GetAtt': ['TestVpcInternetGatewayIGW4C825874', 'InternetGatewayId'], @@ -340,7 +340,7 @@ describe('Vpc V2 with full control', () => { }); }); - //Tests for VPNGatewayV2 + // Tests for VPNGatewayV2 test('enableVpnGatewayV2 defines a new VPNGateway with attachment', () => { myVpc.enableVpnGatewayV2({ type: VpnConnectionType.IPSEC_1, diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/vpc-v2.test.ts b/packages/@aws-cdk/aws-ec2-alpha/test/vpc-v2.test.ts index beb8fcda41c79..cff3e13139e7f 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/vpc-v2.test.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/vpc-v2.test.ts @@ -107,7 +107,7 @@ describe('Vpc V2 with full control', () => { TestVpcAmazonProvided00BF109D: { Type: 'AWS::EC2::VPCCidrBlock', Properties: { - AmazonProvidedIpv6CidrBlock: true, //Amazon Provided IPv6 address + AmazonProvidedIpv6CidrBlock: true, // Amazon Provided IPv6 address VpcId: { 'Fn::GetAtt': [ 'TestVpcE77CE678', diff --git a/packages/@aws-cdk/aws-ec2-alpha/test/vpcv2-import.test.ts b/packages/@aws-cdk/aws-ec2-alpha/test/vpcv2-import.test.ts index 212eb12a47af5..92ea4ec670bb4 100644 --- a/packages/@aws-cdk/aws-ec2-alpha/test/vpcv2-import.test.ts +++ b/packages/@aws-cdk/aws-ec2-alpha/test/vpcv2-import.test.ts @@ -102,7 +102,7 @@ describe('Vpc V2 with full control', () => { }, ], }); - //Subnet with secondary address + // Subnet with secondary address new SubnetV2(stack, 'testsubnet', { vpc, availabilityZone: 'us-west-2a', @@ -124,7 +124,7 @@ describe('Vpc V2 with full control', () => { cidrBlockName: 'ImportedIpamIpv4', }], }); - //Subnet with secondary address from IPAM range + // Subnet with secondary address from IPAM range new SubnetV2(stack, 'testsubnet', { vpc, availabilityZone: 'us-west-2a', @@ -146,14 +146,14 @@ describe('Vpc V2 with full control', () => { cidrBlockName: 'ImportedIpamIpv6', }], }); - //will throw error if IPv6 not enabled using IPAM ipv6 + // will throw error if IPv6 not enabled using IPAM ipv6 vpc.addEgressOnlyInternetGateway(); - //will throw error if IPv6 not enabled using Amazon Provided IPv6 + // will throw error if IPv6 not enabled using Amazon Provided IPv6 new SubnetV2(stack, 'AddnewSubnettoImportedIpam', { availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.0.1.0/28'), - //can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 + // can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 ipv6CidrBlock: new IpCidr('2600:1f24:6c:4000::/64'), vpc: vpc, subnetType: SubnetType.PUBLIC, @@ -171,13 +171,13 @@ describe('Vpc V2 with full control', () => { amazonProvidedIpv6CidrBlock: true, }], }); - //will throw error if IPv6 not enabled using Amazon Provided IPv6 + // will throw error if IPv6 not enabled using Amazon Provided IPv6 vpc.addEgressOnlyInternetGateway(); - //will throw error if IPv6 not enabled using Amazon Provided IPv6 + // will throw error if IPv6 not enabled using Amazon Provided IPv6 new SubnetV2(stack, 'AddnewSubnettoImportedIpam', { availabilityZone: 'us-west-2a', ipv4CidrBlock: new IpCidr('10.0.1.0/28'), - //can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 + // can be uncommented and modified after allocation is done using IPAM - Amazon Provided Ipv6 ipv6CidrBlock: new IpCidr('2600:1f24:6c:4000::/64'), vpc: vpc, subnetType: SubnetType.PUBLIC, diff --git a/packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts b/packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts index 61f30e5cbe419..de29700ba6531 100644 --- a/packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts +++ b/packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts @@ -442,7 +442,7 @@ export class Nodegroup extends Resource implements INodegroup { throw new Error(`The specified AMI does not match the instance types architecture, either specify one of ${possibleAmiTypes.join(', ').toUpperCase()} or don't specify any`); } - //if the user explicitly configured a Windows ami type, make sure the instanceType is allowed + // if the user explicitly configured a Windows ami type, make sure the instanceType is allowed if (props.amiType && windowsAmiTypes.includes(props.amiType) && instanceTypes.filter(isWindowsSupportedInstanceType).length < instanceTypes.length) { throw new Error('The specified instanceType does not support Windows workloads. ' @@ -600,7 +600,7 @@ const gpuAmiTypes: NodegroupAmiType[] = [ * @param instanceType The EC2 instance type */ function isGpuInstanceType(instanceType: InstanceType): boolean { - //compare instanceType to known GPU InstanceTypes + // compare instanceType to known GPU InstanceTypes const knownGpuInstanceTypes = [InstanceClass.P2, InstanceClass.P3, InstanceClass.P3DN, InstanceClass.P4DE, InstanceClass.P4D, InstanceClass.G3S, InstanceClass.G3, InstanceClass.G4DN, InstanceClass.G4AD, InstanceClass.G5, InstanceClass.G5G, InstanceClass.INF1, InstanceClass.INF2]; @@ -613,8 +613,8 @@ function isGpuInstanceType(instanceType: InstanceType): boolean { * @param instanceType The EC2 instance type */ function isWindowsSupportedInstanceType(instanceType: InstanceType): boolean { - //compare instanceType to forbidden InstanceTypes for Windows. Add exception for m6a.16xlarge. - //NOTE: i2 instance class is not present in the InstanceClass enum. + // compare instanceType to forbidden InstanceTypes for Windows. Add exception for m6a.16xlarge. + // NOTE: i2 instance class is not present in the InstanceClass enum. const forbiddenInstanceClasses: InstanceClass[] = [InstanceClass.C3, InstanceClass.C4, InstanceClass.D2, InstanceClass.M4, InstanceClass.M6A, InstanceClass.R3]; return instanceType.toString() === InstanceType.of(InstanceClass.M4, InstanceSize.XLARGE16).toString() || diff --git a/packages/@aws-cdk/aws-eks-v2-alpha/test/fargate.test.ts b/packages/@aws-cdk/aws-eks-v2-alpha/test/fargate.test.ts index 6171271933910..22d416761834d 100644 --- a/packages/@aws-cdk/aws-eks-v2-alpha/test/fargate.test.ts +++ b/packages/@aws-cdk/aws-eks-v2-alpha/test/fargate.test.ts @@ -337,7 +337,7 @@ describe('fargate', () => { ], }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EKS::Cluster', { Logging: { ClusterLogging: { diff --git a/packages/@aws-cdk/aws-eks-v2-alpha/test/helm-chart.test.ts b/packages/@aws-cdk/aws-eks-v2-alpha/test/helm-chart.test.ts index 003fb2cdfa8fc..58817e9e4226b 100644 --- a/packages/@aws-cdk/aws-eks-v2-alpha/test/helm-chart.test.ts +++ b/packages/@aws-cdk/aws-eks-v2-alpha/test/helm-chart.test.ts @@ -213,24 +213,24 @@ describe('helm chart', () => { }); test('should enable atomic operations when specified', () => { - //GIVEN + // GIVEN const { stack, cluster } = testFixtureCluster(); - //WHEN + // WHEN new eks.HelmChart(stack, 'MyAtomicChart', { cluster, chart: 'chart', atomic: true }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties(eks.HelmChart.RESOURCE_TYPE, { Atomic: true }); }); test('should disable atomic operations by default', () => { - //GIVEN + // GIVEN const { stack, cluster } = testFixtureCluster(); - //WHEN + // WHEN new eks.HelmChart(stack, 'MyAtomicChart', { cluster, chart: 'chart' }); - //THEN + // THEN const charts = Template.fromStack(stack).findResources(eks.HelmChart.RESOURCE_TYPE, { Atomic: true }); expect(Object.keys(charts).length).toEqual(0); diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts index 991aecdff82fc..b2101e4d7e47b 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts @@ -142,7 +142,7 @@ export class QueuedMatchmakingConfiguration extends MatchmakingConfigurationBase throw new Error(`Matchmaking configuration request timeout can not exceed 43200 seconds, actual ${props.requestTimeout.toSeconds()} seconds.`); } - //Notification target + // Notification target this.notificationTarget = props.notificationTarget; if (!this.notificationTarget) { this.notificationTarget = new sns.Topic(this, 'Topic', {}); diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts index 7f7df76116168..36d4a67d9ed89 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts @@ -82,7 +82,7 @@ export class StandaloneMatchmakingConfiguration extends MatchmakingConfiguration throw new Error(`Matchmaking configuration request timeout can not exceed 43200 seconds, actual ${props.requestTimeout.toSeconds()} seconds.`); } - //Notification target + // Notification target this.notificationTarget = props.notificationTarget; if (!this.notificationTarget) { this.notificationTarget = new sns.Topic(this, 'Topic', {}); diff --git a/packages/@aws-cdk/aws-gamelift-alpha/test/integ.game-server-group.ts b/packages/@aws-cdk/aws-gamelift-alpha/test/integ.game-server-group.ts index f25139302bf14..85533b4276e82 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/test/integ.game-server-group.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/test/integ.game-server-group.ts @@ -12,7 +12,7 @@ class TestStack extends cdk.Stack { // Create default VPC const vpc = new ec2.Vpc(this, 'Vpc', { restrictDefaultSecurityGroup: false }); - //Create default launch template + // Create default launch template const launchTemplate = new ec2.LaunchTemplate(this, 'LaunchTemplate', { machineImage: ec2.MachineImage.latestAmazonLinux(), }); diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/jobs/python-shell-job.ts b/packages/@aws-cdk/aws-glue-alpha/lib/jobs/python-shell-job.ts index 71bcd566d8c41..66375eaf1b53d 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/jobs/python-shell-job.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/jobs/python-shell-job.ts @@ -113,9 +113,9 @@ export class PythonShellJob extends Job { const args: { [key: string]: string } = {}; args['--job-language'] = JobLanguage.PYTHON; - //If no Python version set (default 3.9) or the version is set to 3.9 then set library-set argument + // If no Python version set (default 3.9) or the version is set to 3.9 then set library-set argument if (!props.pythonVersion || props.pythonVersion == PythonVersion.THREE_NINE) { - //Selecting this option includes common libraries for Python 3.9 + // Selecting this option includes common libraries for Python 3.9 args['library-set'] = 'analytics'; } diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-pyspark-flex-etl.ts b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-pyspark-flex-etl.ts index d53bb703c0123..14b53a7490304 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.job-pyspark-flex-etl.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.job-pyspark-flex-etl.ts @@ -35,7 +35,7 @@ new glue.PySparkFlexEtlJob(stack, 'BasicPySparkFlexEtlJob', { role: iam_role, }); -/*new glue.PySparkFlexEtlJob(stack, 'BasicPySparkFlexEtlJobv3', { +/* new glue.PySparkFlexEtlJob(stack, 'BasicPySparkFlexEtlJobv3', { script: script, role: iam_role, glueVersion: glue.GlueVersion.V3_0, diff --git a/packages/@aws-cdk/aws-iot-actions-alpha/test/https/https-action.test.ts b/packages/@aws-cdk/aws-iot-actions-alpha/test/https/https-action.test.ts index eafd986ce54b1..5da26a4ef0808 100644 --- a/packages/@aws-cdk/aws-iot-actions-alpha/test/https/https-action.test.ts +++ b/packages/@aws-cdk/aws-iot-actions-alpha/test/https/https-action.test.ts @@ -63,7 +63,7 @@ test('can set confirmation url', () => { }), ); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::IoT::TopicRule', { TopicRulePayload: { Actions: [ @@ -97,7 +97,7 @@ test('can set http headers', () => { new actions.HttpsAction(expectedUrl, { headers: headers }), ); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::IoT::TopicRule', { TopicRulePayload: { Actions: [ @@ -134,7 +134,7 @@ test('can set http auth', () => { new actions.HttpsAction(expectedUrl, { auth: expectedAuth }), ); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::IoT::TopicRule', { TopicRulePayload: { Actions: [ diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/test/integ.application-code-from-bucket.lit.ts b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/test/integ.application-code-from-bucket.lit.ts index 3e351e48062a2..bdda181df0721 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/test/integ.application-code-from-bucket.lit.ts +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/test/integ.application-code-from-bucket.lit.ts @@ -12,11 +12,11 @@ const asset = new assets.Asset(stack, 'CodeAsset', { const bucket = asset.bucket; const fileKey = asset.s3ObjectKey; -///! show +/// !show new flink.Application(stack, 'App', { code: flink.ApplicationCode.fromBucket(bucket, fileKey), runtime: flink.Runtime.FLINK_1_19, }); -///! hide +/// !hide app.synth(); diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts index 653f0a8318930..219541ade73d6 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts @@ -844,7 +844,7 @@ describe('reboot for Parameter Changes', () => { rebootForParameterChanges: true, }); cluster.addToParameterGroup('foo', 'bar'); - //WHEN + // WHEN cluster.enableRebootForParameterChanges(); // THEN Template.fromStack(stack).resourceCountIs('Custom::RedshiftClusterRebooter', 1); @@ -872,7 +872,7 @@ describe('reboot for Parameter Changes', () => { cluster.enableRebootForParameterChanges(); cluster2.enableRebootForParameterChanges(); - //THEN + // THEN const template = Template.fromStack(stack); template.resourceCountIs('Custom::RedshiftClusterRebooter', 2); template.templateMatches({ @@ -903,7 +903,7 @@ describe('reboot for Parameter Changes', () => { // WHEN cluster.addToParameterGroup('lorem', 'ipsum'); - //THEN + // THEN const template = Template.fromStack(stack); template.hasResourceProperties('Custom::RedshiftClusterRebooter', { ParametersString: JSON.stringify( diff --git a/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts b/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts index cb51823c5cdcf..cc727869d210a 100644 --- a/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts +++ b/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts @@ -736,7 +736,7 @@ describe('method tests', () => { const queue = new ResourceDifference(undefined, undefined, { resourceType: {}, propertyDiffs: {}, otherDiffs: {} }); const logicalId = 'Queue'; - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -760,7 +760,7 @@ describe('method tests', () => { ); const logicalId = 'Queue'; - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -788,7 +788,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -818,7 +818,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -850,7 +850,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -884,7 +884,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -918,7 +918,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -952,7 +952,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN @@ -989,7 +989,7 @@ describe('method tests', () => { }, ); - //WHEN + // WHEN templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); // THEN diff --git a/packages/@aws-cdk/integ-runner/test/runner/integ-test-suite.test.ts b/packages/@aws-cdk/integ-runner/test/runner/integ-test-suite.test.ts index 8534f8bc1b71f..eee818abe7240 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/integ-test-suite.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/integ-test-suite.test.ts @@ -266,7 +266,7 @@ describe('Legacy Integration test cases', () => { // WHEN const context = LegacyIntegTestSuite.getPragmaContext(testsFile); - //THEN + // THEN expect(context).toEqual({ '@aws-cdk/core:newStyleStackSynthesis': 'true', }); diff --git a/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts b/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts index 5f6bbf064b2f2..101b6afc910dd 100644 --- a/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts +++ b/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts @@ -5,7 +5,6 @@ import { DeployAssert } from '../../lib/assertions/private/deploy-assert'; import { IntegTest } from '../../lib/test-case'; describe('DeployAssert', () => { - test('of', () => { const app = new App(); const stack = new Stack(app, 'TestStack'); @@ -379,7 +378,7 @@ describe('DeployAssert', () => { describe('User provided assertions stack', () => { test('Same stack for integration test and assertions', () => { - //GIVEN + // GIVEN const app = new App(); const stack = new Stack(app, 'TestStack'); @@ -398,7 +397,7 @@ describe('User provided assertions stack', () => { }); test('Different stack for integration test and assertions', () => { - //GIVEN + // GIVEN const app = new App(); const integStack = new Stack(app, 'TestStack'); const assertionStack = new Stack(app, 'AssertionsStack'); @@ -419,7 +418,7 @@ describe('User provided assertions stack', () => { }); test('not throw when environment matches', () => { - //GIVEN + // GIVEN const app = new App(); const env = { region: 'us-west-2' }; const integStack = new Stack(app, 'IntegStack', { env: env }); diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts index 296e683ecac49..bccf2ac56f3aa 100644 --- a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts @@ -36,13 +36,13 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource return new StackCollection(this, allStacks); case StackSelectionStrategy.MAIN_ASSEMBLY: if (topLevelStacks.length < 1) { - //@todo text should probably be handled in io host + // @todo text should probably be handled in io host throw new ToolkitError('No stack found in the main cloud assembly. Use "list" to print manifest'); } return this.extendStacks(topLevelStacks, allStacks, extend); case StackSelectionStrategy.ONLY_SINGLE: if (topLevelStacks.length !== 1) { - //@todo text should probably be handled in io host + // @todo text should probably be handled in io host throw new ToolkitError('Since this app includes more than a single stack, specify which stacks to use (wildcards are supported) or specify `--all`\n' + `Stacks: ${allStacks.map(x => x.hierarchicalId).join(' ยท ')}`); } @@ -53,7 +53,7 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource selector.strategy === StackSelectionStrategy.PATTERN_MUST_MATCH_SINGLE && matched.stackCount !== 1 ) { - //@todo text should probably be handled in io host + // @todo text should probably be handled in io host throw new ToolkitError( `Stack selection is ambiguous, please choose a specific stack for import [${allStacks.map(x => x.hierarchicalId).join(',')}]`, ); @@ -62,7 +62,7 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource selector.strategy === StackSelectionStrategy.PATTERN_MUST_MATCH && matched.stackCount < 1 ) { - //@todo text should probably be handled in io host + // @todo text should probably be handled in io host throw new ToolkitError( `Stack selection is ambiguous, please choose a specific stack for import [${allStacks.map(x => x.hierarchicalId).join(',')}]`, ); diff --git a/packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts b/packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts index d37febc7ef807..9b1324c0b8055 100644 --- a/packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts +++ b/packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts @@ -153,11 +153,11 @@ class StepFunctionsExecutionIntegration extends AwsIntegration { throw new Error('State Machine must be of type "EXPRESS". Please use StateMachineType.EXPRESS as the stateMachineType'); } - //if not imported, extract the name from the CFN layer to reach the - //literal value if it is given (rather than a token) + // if not imported, extract the name from the CFN layer to reach the + // literal value if it is given (rather than a token) stateMachineName = (this.stateMachine.node.defaultChild as sfn.CfnStateMachine).stateMachineName; } else { - //imported state machine + // imported state machine stateMachineName = `StateMachine-${this.stateMachine.stack.node.addr}`; } diff --git a/packages/aws-cdk-lib/aws-apigateway/test/integrations/stepfunctions.test.ts b/packages/aws-cdk-lib/aws-apigateway/test/integrations/stepfunctions.test.ts index ce42451222fe0..b47d249a66aaf 100644 --- a/packages/aws-cdk-lib/aws-apigateway/test/integrations/stepfunctions.test.ts +++ b/packages/aws-cdk-lib/aws-apigateway/test/integrations/stepfunctions.test.ts @@ -7,14 +7,14 @@ import * as apigw from '../../lib'; describe('StepFunctionsIntegration', () => { describe('startExecution', () => { test('minimal setup', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine); api.root.addMethod('GET', integ); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::Method', { ResourceId: { 'Fn::GetAtt': [ @@ -66,10 +66,10 @@ describe('StepFunctionsIntegration', () => { }); test('headers are NOT included by default', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine); api.root.addMethod('GET', integ); @@ -92,10 +92,10 @@ describe('StepFunctionsIntegration', () => { }); test('headers are included when specified by the integration', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine, { headers: true, }); @@ -120,10 +120,10 @@ describe('StepFunctionsIntegration', () => { }); test('querystring and path are included by default', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine); api.root.addMethod('GET', integ); @@ -163,10 +163,10 @@ describe('StepFunctionsIntegration', () => { }); test('querystring and path are false when specified by the integration', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine, { querystring: false, path: false, @@ -209,10 +209,10 @@ describe('StepFunctionsIntegration', () => { }); test('request context is NOT included by default', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine, {}); api.root.addMethod('GET', integ); @@ -235,10 +235,10 @@ describe('StepFunctionsIntegration', () => { }); test('request context is included when specified by the integration', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine, { requestContext: { accountId: true, @@ -265,10 +265,10 @@ describe('StepFunctionsIntegration', () => { }); test('authorizer context is included when specified by the integration', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const integ = apigw.StepFunctionsIntegration.startExecution(stateMachine, { authorizer: true, }); @@ -357,7 +357,7 @@ describe('StepFunctionsIntegration', () => { }); test('fails integration if State Machine is not of type EXPRESS', () => { - //GIVEN + // GIVEN const stack = new cdk.Stack(); const restapi = new apigw.RestApi(stack, 'RestApi'); const method = restapi.root.addMethod('ANY'); @@ -367,17 +367,17 @@ describe('StepFunctionsIntegration', () => { }); const integration = apigw.StepFunctionsIntegration.startExecution(stateMachine); - //WHEN + THEN + // WHEN + THEN expect(() => integration.bind(method)) .toThrow(/State Machine must be of type "EXPRESS". Please use StateMachineType.EXPRESS as the stateMachineType/); }); }); test('addMethod is not susceptible to false sharing of arrays', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const methodOptions = { methodResponses: [ { @@ -490,10 +490,10 @@ describe('StepFunctionsIntegration', () => { }); test('default method responses are not created when useDefaultMethodResponses is false', () => { - //GIVEN + // GIVEN const { stack, api, stateMachine } = givenSetup(); - //WHEN + // WHEN const methodOptions = { methodResponses: [ { diff --git a/packages/aws-cdk-lib/aws-apigateway/test/stepfunctions-api.test.ts b/packages/aws-cdk-lib/aws-apigateway/test/stepfunctions-api.test.ts index ba295ac7088c0..678b0b9f1e375 100644 --- a/packages/aws-cdk-lib/aws-apigateway/test/stepfunctions-api.test.ts +++ b/packages/aws-cdk-lib/aws-apigateway/test/stepfunctions-api.test.ts @@ -7,17 +7,17 @@ import { StepFunctionsIntegration } from '../lib'; describe('Step Functions api', () => { test('StepFunctionsRestApi defines correct REST API resources', () => { - //GIVEN + // GIVEN const { stack, stateMachine } = givenSetup(); - //WHEN + // WHEN const api = whenCondition(stack, stateMachine); expect(() => { api.root.addResource('not allowed'); }).toThrow(); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::Method', { HttpMethod: 'ANY', MethodResponses: getMethodResponse(), @@ -158,16 +158,16 @@ describe('Step Functions api', () => { }); test('default method responses are not created when useDefaultMethodResponses is false', () => { - //GIVEN + // GIVEN const { stack, stateMachine } = givenSetup(); - //WHEN + // WHEN new apigw.StepFunctionsRestApi(stack, 'StepFunctionsRestApi', { stateMachine: stateMachine, useDefaultMethodResponses: false, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::Method', { HttpMethod: 'ANY', MethodResponses: Match.absent(), @@ -175,12 +175,12 @@ describe('Step Functions api', () => { }); test('fails if options.defaultIntegration is set', () => { - //GIVEN + // GIVEN const { stack, stateMachine } = givenSetup(); const httpURL: string = 'https://foo/bar'; - //WHEN & THEN + // WHEN & THEN expect(() => new apigw.StepFunctionsRestApi(stack, 'StepFunctionsRestApi', { stateMachine: stateMachine, defaultIntegration: new apigw.HttpIntegration(httpURL), @@ -189,7 +189,7 @@ describe('Step Functions api', () => { }); test('fails if State Machine is not of type EXPRESS', () => { - //GIVEN + // GIVEN const stack = new cdk.Stack(); const passTask = new sfn.Pass(stack, 'passTask', { @@ -201,7 +201,7 @@ describe('Step Functions api', () => { stateMachineType: sfn.StateMachineType.STANDARD, }); - //WHEN & THEN + // WHEN & THEN expect(() => new apigw.StepFunctionsRestApi(stack, 'StepFunctionsRestApi', { stateMachine: stateMachine, })).toThrow(/State Machine must be of type "EXPRESS". Please use StateMachineType.EXPRESS as the stateMachineType/); diff --git a/packages/aws-cdk-lib/aws-appsync/test/appsync-grant.test.ts b/packages/aws-cdk-lib/aws-appsync/test/appsync-grant.test.ts index b74e995ed4e80..a9edf4acdcf2b 100644 --- a/packages/aws-cdk-lib/aws-appsync/test/appsync-grant.test.ts +++ b/packages/aws-cdk-lib/aws-appsync/test/appsync-grant.test.ts @@ -27,7 +27,7 @@ beforeEach(() => { describe('grant Permissions', () => { test('IamResource throws error when custom is called with no arguments', () => { - //THEN + // THEN expect(() => { api.grant(role, appsync.IamResource.custom(), 'appsync:GraphQL'); }).toThrow('At least 1 custom ARN must be provided.'); @@ -590,7 +590,7 @@ describe('imported API', () => { describe('grant Permissions', () => { test('IamResource throws error when custom is called with no arguments', () => { - //THEN + // THEN expect(() => { importedApi.grant(role, appsync.IamResource.custom(), 'appsync:GraphQL'); }).toThrow('At least 1 custom ARN must be provided.'); diff --git a/packages/aws-cdk-lib/aws-certificatemanager/test/certificate.test.ts b/packages/aws-cdk-lib/aws-certificatemanager/test/certificate.test.ts index 389d31e1c09aa..5f34d7b223b52 100644 --- a/packages/aws-cdk-lib/aws-certificatemanager/test/certificate.test.ts +++ b/packages/aws-cdk-lib/aws-certificatemanager/test/certificate.test.ts @@ -261,7 +261,7 @@ describe('CertificateValidation.fromDns', () => { subjectAlternativeNames: ['*.test.example.com'], }); - //Wildcard domain names are de-duped. + // Wildcard domain names are de-duped. Template.fromStack(stack).hasResourceProperties('AWS::CertificateManager::Certificate', { DomainName: 'test.example.com', DomainValidationOptions: [ @@ -289,7 +289,7 @@ describe('CertificateValidation.fromDns', () => { subjectAlternativeNames: ['*.test.example.com', '*.foo.test.example.com', 'bar.test.example.com'], }); - //Wildcard domain names are de-duped. + // Wildcard domain names are de-duped. Template.fromStack(stack).hasResourceProperties('AWS::CertificateManager::Certificate', { DomainName: 'test.example.com', DomainValidationOptions: [ diff --git a/packages/aws-cdk-lib/aws-cloudwatch/test/cross-environment.test.ts b/packages/aws-cdk-lib/aws-cloudwatch/test/cross-environment.test.ts index ece55e300cf21..ab135664e3d7a 100644 --- a/packages/aws-cdk-lib/aws-cloudwatch/test/cross-environment.test.ts +++ b/packages/aws-cdk-lib/aws-cloudwatch/test/cross-environment.test.ts @@ -151,7 +151,7 @@ describe('cross environment', () => { }); test('metric attached to stack3 will render in stack1', () => { - //Cross-account metrics are supported in Alarms + // Cross-account metrics are supported in Alarms // GIVEN new Alarm(stack1, 'Alarm', { diff --git a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts index c9ac2714507cd..bfb9b4ef4d9ae 100644 --- a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts +++ b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts @@ -220,7 +220,7 @@ describe('codecommit', () => { }); expect(stack.resolve(repo.repositoryName)).toEqual('my-repo'); - //local name resolution should use stack region + // local name resolution should use stack region expect(stack.resolve(repo.repositoryCloneUrlHttp)).toEqual({ 'Fn::Join': [ '', diff --git a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/google.ts b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/google.ts index 391573acfcf93..9c76fb1d05ed7 100644 --- a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/google.ts +++ b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/google.ts @@ -46,7 +46,7 @@ export class UserPoolIdentityProviderGoogle extends UserPoolIdentityProviderBase const scopes = props.scopes ?? ['profile']; - //at least one of the properties must be configured + // at least one of the properties must be configured if ((!props.clientSecret && !props.clientSecretValue) || (props.clientSecret && props.clientSecretValue)) { throw new Error('Exactly one of "clientSecret" or "clientSecretValue" must be configured.'); diff --git a/packages/aws-cdk-lib/aws-cognito/test/user-pool-resource-server.test.ts b/packages/aws-cdk-lib/aws-cognito/test/user-pool-resource-server.test.ts index e101a05d249c7..e6b1874f4e4b3 100644 --- a/packages/aws-cdk-lib/aws-cognito/test/user-pool-resource-server.test.ts +++ b/packages/aws-cdk-lib/aws-cognito/test/user-pool-resource-server.test.ts @@ -14,7 +14,7 @@ describe('User Pool Resource Server', () => { identifier: 'users', }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolResourceServer', { Identifier: 'users', Name: 'users', @@ -34,7 +34,7 @@ describe('User Pool Resource Server', () => { identifier: 'users', }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolResourceServer', { Identifier: 'users', Name: 'internal-users', @@ -58,7 +58,7 @@ describe('User Pool Resource Server', () => { ], }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolResourceServer', { Scopes: [ { diff --git a/packages/aws-cdk-lib/aws-config/lib/rule.ts b/packages/aws-cdk-lib/aws-config/lib/rule.ts index f5e7f489ca65e..33c05eb972136 100644 --- a/packages/aws-cdk-lib/aws-config/lib/rule.ts +++ b/packages/aws-cdk-lib/aws-config/lib/rule.ts @@ -2525,7 +2525,7 @@ export class ResourceType { public static readonly NETWORK_FIREWALL_RULE_GROUP = new ResourceType('AWS::NetworkFirewall::RuleGroup'); /** AWS ResilienceHub resiliency policy */ public static readonly RESILIENCEHUB_RESILIENCY_POLICY = new ResourceType('AWS::ResilienceHub::ResiliencyPolicy'); - /**AWS Secrets Manager secret */ + /** AWS Secrets Manager secret */ public static readonly SECRETS_MANAGER_SECRET = new ResourceType('AWS::SecretsManager::Secret'); /** AWS Service Catalog CloudFormation product */ public static readonly SERVICE_CATALOG_CLOUDFORMATION_PRODUCT = new ResourceType('AWS::ServiceCatalog::CloudFormationProduct'); diff --git a/packages/aws-cdk-lib/aws-ec2/lib/ip-addresses.ts b/packages/aws-cdk-lib/aws-ec2/lib/ip-addresses.ts index c5c42834b3b21..97d95636ca7e0 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/ip-addresses.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/ip-addresses.ts @@ -393,7 +393,7 @@ class Cidr implements IIpAddresses { const allocatedSubnets: AllocatedSubnet[] = []; const subnetsWithoutDefinedCidr: IRequestedSubnetInstance[] = []; - //default: Available IP space is evenly divided across subnets if no cidr is given. + // default: Available IP space is evenly divided across subnets if no cidr is given. input.requestedSubnets.forEach((requestedSubnet, index) => { if (requestedSubnet.configuration.cidrMask === undefined) { @@ -496,7 +496,7 @@ class AmazonProvided implements IIpv6Addresses { * Note this is specific to the IPv6 CIDR. */ allocateVpcIpv6Cidr(input: AllocateVpcIpv6CidrRequest): CfnVPCCidrBlock { - //throw new Error(`vpcId not found, got ${(scope as any).vpcId}`); + // throw new Error(`vpcId not found, got ${(scope as any).vpcId}`); return new CfnVPCCidrBlock(input.scope, 'ipv6cidr', { vpcId: input.vpcId, amazonProvidedIpv6CidrBlock: this.amazonProvided, diff --git a/packages/aws-cdk-lib/aws-ec2/test/bastion-host.test.ts b/packages/aws-cdk-lib/aws-ec2/test/bastion-host.test.ts index 51db90580f7d9..cd97b4594174e 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/bastion-host.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/bastion-host.test.ts @@ -158,11 +158,11 @@ describe('bastion host', () => { }); test('imdsv2 is required', () => { - //GIVEN + // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN new BastionHostLinux(stack, 'Bastion', { vpc, requireImdsv2: true, @@ -179,7 +179,7 @@ describe('bastion host', () => { }); test('appends new hash digest to instance logical Id if userDataCausesReplacement is true', () => { - //GIVEN + // GIVEN const stackOld = new Stack(); const stackNew = new Stack(); const vpcOld = new Vpc(stackOld, 'VPC'); @@ -230,7 +230,7 @@ describe('bastion host', () => { }); test('does not append new hash digest to instance logical Id if userDataCausesReplacement is false', () => { - //GIVEN + // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VPC'); const sshKeys = ['foo', 'bar']; diff --git a/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts b/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts index 0a7f5f3a7181b..8dc17c82f1f67 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts @@ -137,7 +137,7 @@ test('empty configs are not rendered', () => { }); test('duplicate config arguments not deduplicated', () => { - //GIVEN + // GIVEN const config = new ec2.InitConfig([ ec2.InitCommand.argvCommand([ 'useradd', '-u', '1001', '-g', '1001', 'eguser', diff --git a/packages/aws-cdk-lib/aws-ec2/test/instance.test.ts b/packages/aws-cdk-lib/aws-ec2/test/instance.test.ts index d4f0de3ffce7b..f78adfc0aa86d 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/instance.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/instance.test.ts @@ -142,18 +142,18 @@ describe('instance', () => { test('sameInstanceClassAs compares InstanceTypes contains dashes', () => { // GIVEN const comparitor = InstanceType.of(InstanceClass.M7I_FLEX, InstanceSize.LARGE); - //WHEN + // WHEN const largerInstanceType = InstanceType.of(InstanceClass.M7I_FLEX, InstanceSize.XLARGE); - //THEN + // THEN expect(largerInstanceType.sameInstanceClassAs(comparitor)).toBeTruthy(); }); test('sameInstanceClassAs compares InstanceSize contains dashes', () => { // GIVEN const comparitor = new InstanceType('c7a.metal-48xl'); - //WHEN + // WHEN const largerInstanceType = new InstanceType('c7a.xlarge'); - //THEN + // THEN expect(largerInstanceType.sameInstanceClassAs(comparitor)).toBeTruthy(); }); @@ -864,27 +864,27 @@ test('ssm permissions adds right managed policy', () => { test('sameInstanceClassAs compares identical InstanceTypes correctly', () => { // GIVEN const comparitor = InstanceType.of(InstanceClass.T3, InstanceSize.LARGE); - //WHEN + // WHEN const sameInstanceType = InstanceType.of(InstanceClass.T3, InstanceSize.LARGE); - //THEN + // THEN expect(sameInstanceType.sameInstanceClassAs(comparitor)).toBeTruthy(); }); test('sameInstanceClassAs compares InstanceTypes correctly regardless of size', () => { // GIVEN const comparitor = InstanceType.of(InstanceClass.T3, InstanceSize.LARGE); - //WHEN + // WHEN const largerInstanceType = InstanceType.of(InstanceClass.T3, InstanceSize.XLARGE); - //THEN + // THEN expect(largerInstanceType.sameInstanceClassAs(comparitor)).toBeTruthy(); }); test('sameInstanceClassAs compares different InstanceTypes correctly', () => { // GIVEN const comparitor = InstanceType.of(InstanceClass.C4, InstanceSize.LARGE); - //WHEN + // WHEN const instanceType = new InstanceType('t3.large'); - //THEN + // THEN expect(instanceType.sameInstanceClassAs(comparitor)).toBeFalsy(); }); diff --git a/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts b/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts index 50e7f9ae5f224..7f69857ed0fae 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts @@ -209,13 +209,13 @@ describe('security group', () => { }); describe('Inline Rule Control', () => { - //Not inlined + // Not inlined describe('When props.disableInlineRules is true', () => { testRulesAreNotInlined(undefined, true); }); describe('When context.disableInlineRules is true', () => { testRulesAreNotInlined(true, undefined); }); describe('When context.disableInlineRules is true and props.disableInlineRules is true', () => { testRulesAreNotInlined(true, true); }); describe('When context.disableInlineRules is false and props.disableInlineRules is true', () => { testRulesAreNotInlined(false, true); }); describe('When props.disableInlineRules is true and context.disableInlineRules is null', () => { testRulesAreNotInlined(null, true); }); - //Inlined + // Inlined describe('When context.disableInlineRules is false and props.disableInlineRules is false', () => { testRulesAreInlined(false, false); }); describe('When context.disableInlineRules is true and props.disableInlineRules is false', () => { testRulesAreInlined(true, false); }); describe('When context.disableInlineRules is false', () => { testRulesAreInlined(false, undefined); }); @@ -389,7 +389,7 @@ describe('security group', () => { describe('Peer security group ID validation', () => { test('passes with valid security group ID', () => { - //GIVEN + // GIVEN const securityGroupIds = ['sg-12345678', 'sg-0123456789abcdefg']; // THEN @@ -399,7 +399,7 @@ describe('security group', () => { }); test('passes with valid security group ID and source owner id', () => { - //GIVEN + // GIVEN const securityGroupIds = ['sg-12345678', 'sg-0123456789abcdefg']; const ownerIds = ['000000000000', '000000000001']; @@ -446,10 +446,10 @@ describe('security group', () => { const vpc = new Vpc(stack, 'VPC'); const sg = new SecurityGroup(stack, 'SG', { vpc }); - //WHEN + // WHEN sg.addIngressRule(Peer.securityGroupId('sg-123456789'), Port.allTcp(), 'no owner id property'); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroup', { SecurityGroupIngress: [{ SourceSecurityGroupId: 'sg-123456789', @@ -467,10 +467,10 @@ describe('security group', () => { const vpc = new Vpc(stack, 'VPC'); const sg = new SecurityGroup(stack, 'SG', { vpc }); - //WHEN + // WHEN sg.addIngressRule(Peer.securityGroupId('sg-123456789', '000000000000'), Port.allTcp(), 'contains owner id property'); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroup', { SecurityGroupIngress: [{ SourceSecurityGroupId: 'sg-123456789', @@ -489,10 +489,10 @@ describe('security group', () => { const vpc = new Vpc(stack, 'VPC'); const sg = new SecurityGroup(stack, 'SG', { vpc, allowAllOutbound: false }); - //WHEN + // WHEN sg.addEgressRule(Peer.securityGroupId('sg-123456789', '000000000000'), Port.allTcp(), 'no owner id property'); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroup', { SecurityGroupEgress: [{ DestinationSecurityGroupId: 'sg-123456789', diff --git a/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts b/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts index 6faa231a475dd..40650ad5b2c44 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts @@ -615,80 +615,80 @@ describe('vpc endpoint', () => { }); test('test vpc interface endpoint with cn.com.amazonaws prefix can be created correctly in cn-north-1', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-north-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('ECR Endpoint', { service: InterfaceVpcEndpointAwsService.ECR, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'cn.com.amazonaws.cn-north-1.ecr.api', }); }); test('test vpc interface endpoint with cn.com.amazonaws prefix can be created correctly in cn-northwest-1', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-northwest-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Lambda Endpoint', { service: InterfaceVpcEndpointAwsService.LAMBDA, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'cn.com.amazonaws.cn-northwest-1.lambda', }); }); test('test vpc interface endpoint without cn.com.amazonaws prefix can be created correctly in cn-north-1', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-north-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('ECS Endpoint', { service: InterfaceVpcEndpointAwsService.ECS, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.cn-north-1.ecs', }); }); test('test vpc interface endpoint without cn.com.amazonaws prefix can be created correctly in cn-northwest-1', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-northwest-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Glue Endpoint', { service: InterfaceVpcEndpointAwsService.GLUE, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.cn-northwest-1.glue', }); }); test('test vpc interface endpoint for transcribe can be created correctly in non-china regions', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-east-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Transcribe Endpoint', { service: InterfaceVpcEndpointAwsService.TRANSCRIBE, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-east-1.transcribe', }); @@ -697,17 +697,17 @@ describe('vpc endpoint', () => { test.each([ ['transcribe', InterfaceVpcEndpointAwsService.TRANSCRIBE], ])('test vpc interface endpoint with .cn suffix for %s can be created correctly in China regions', (name: string, given: InterfaceVpcEndpointAwsService) => { - //GIVEN + // GIVEN const stack1 = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-north-1' } }); const stack2 = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-northwest-1' } }); const vpc1 = new Vpc(stack1, 'VPC'); const vpc2 = new Vpc(stack2, 'VPC'); - //WHEN + // WHEN vpc1.addInterfaceEndpoint('Endpoint', { service: given }); vpc2.addInterfaceEndpoint('Endpoint', { service: given }); - //THEN + // THEN Template.fromStack(stack1).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: `cn.com.amazonaws.cn-north-1.${name}.cn`, }); @@ -768,17 +768,17 @@ describe('vpc endpoint', () => { ['transfer', InterfaceVpcEndpointAwsService.TRANSFER], ['xray', InterfaceVpcEndpointAwsService.XRAY], ])('test vpc interface endpoint for %s can be created correctly in China regions', (name: string, given: InterfaceVpcEndpointAwsService) => { - //GIVEN + // GIVEN const stack1 = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-north-1' } }); const stack2 = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-northwest-1' } }); const vpc1 = new Vpc(stack1, 'VPC'); const vpc2 = new Vpc(stack2, 'VPC'); - //WHEN + // WHEN vpc1.addInterfaceEndpoint('Endpoint', { service: given }); vpc2.addInterfaceEndpoint('Endpoint', { service: given }); - //THEN + // THEN Template.fromStack(stack1).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: `cn.com.amazonaws.cn-north-1.${name}`, }); @@ -790,14 +790,14 @@ describe('vpc endpoint', () => { ['iotsitewise.api', InterfaceVpcEndpointAwsService.IOT_SITEWISE_API], ['iotsitewise.data', InterfaceVpcEndpointAwsService.IOT_SITEWISE_DATA], ])('test vpc interface endpoint for %s can be created correctly in cn-north-1 only', (name: string, given: InterfaceVpcEndpointAwsService) => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-north-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Endpoint', { service: given }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: `cn.com.amazonaws.cn-north-1.${name}`, }); @@ -806,25 +806,25 @@ describe('vpc endpoint', () => { ['account', InterfaceVpcEndpointAwsService.ACCOUNT_MANAGEMENT], ['workspaces', InterfaceVpcEndpointAwsService.WORKSPACES], ])('test vpc interface endpoint for %s can be created correctly in cn-northwest-1 only', (name: string, given: InterfaceVpcEndpointAwsService) => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'cn-northwest-1' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Endpoint', { service: given }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: `cn.com.amazonaws.cn-northwest-1.${name}`, }); }); test('test codeartifact vpc interface endpoint in us-west-2', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('CodeArtifact API Endpoint', { service: InterfaceVpcEndpointAwsService.CODEARTIFACT_API, }); @@ -833,7 +833,7 @@ describe('vpc endpoint', () => { service: InterfaceVpcEndpointAwsService.CODEARTIFACT_REPOSITORIES, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-west-2.codeartifact.repositories', }); @@ -845,16 +845,16 @@ describe('vpc endpoint', () => { }); test('test s3 vpc interface endpoint in us-west-2', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('CodeArtifact API Endpoint', { service: InterfaceVpcEndpointAwsService.S3, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-west-2.s3', @@ -863,16 +863,16 @@ describe('vpc endpoint', () => { }); test('test batch vpc interface endpoint in us-west-2', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('CodeArtifact API Endpoint', { service: InterfaceVpcEndpointAwsService.BATCH, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-west-2.batch', @@ -881,11 +881,11 @@ describe('vpc endpoint', () => { }); test('test autoscaling vpc interface endpoint in us-west-2', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Autoscaling API Endpoint', { service: InterfaceVpcEndpointAwsService.AUTOSCALING, }); @@ -898,7 +898,7 @@ describe('vpc endpoint', () => { service: InterfaceVpcEndpointAwsService.APPLICATION_AUTOSCALING, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-west-2.autoscaling', @@ -914,11 +914,11 @@ describe('vpc endpoint', () => { }); test('global vpc interface endpoints', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('Global S3 API Endpoint', { service: InterfaceVpcEndpointAwsService.S3_MULTI_REGION_ACCESS_POINTS, }); @@ -926,7 +926,7 @@ describe('vpc endpoint', () => { service: InterfaceVpcEndpointAwsService.CODECATALYST, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.s3-global.accesspoint', }); @@ -936,17 +936,17 @@ describe('vpc endpoint', () => { }); test('test vpc interface endpoint with private dns disabled', () => { - //GIVEN + // GIVEN const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: 'us-west-2' } }); const vpc = new Vpc(stack, 'VPC'); - //WHEN + // WHEN vpc.addInterfaceEndpoint('DynamoDB Endpoint', { service: InterfaceVpcEndpointAwsService.DYNAMODB, privateDnsEnabled: false, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { ServiceName: 'com.amazonaws.us-west-2.dynamodb', VpcId: stack.resolve(vpc.vpcId), diff --git a/packages/aws-cdk-lib/aws-ecs/test/task-definition.test.ts b/packages/aws-cdk-lib/aws-ecs/test/task-definition.test.ts index 72af3300eb88d..fd2f460490bd8 100644 --- a/packages/aws-cdk-lib/aws-ecs/test/task-definition.test.ts +++ b/packages/aws-cdk-lib/aws-ecs/test/task-definition.test.ts @@ -36,7 +36,7 @@ describe('task definition', () => { compatibility: ecs.Compatibility.EXTERNAL, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { NetworkMode: 'bridge', }); diff --git a/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts b/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts index 9b5b7b489b3e4..0327aa42efb91 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts @@ -442,7 +442,7 @@ export class Nodegroup extends Resource implements INodegroup { throw new Error(`The specified AMI does not match the instance types architecture, either specify one of ${possibleAmiTypes.join(', ').toUpperCase()} or don't specify any`); } - //if the user explicitly configured a Windows ami type, make sure the instanceType is allowed + // if the user explicitly configured a Windows ami type, make sure the instanceType is allowed if (props.amiType && windowsAmiTypes.includes(props.amiType) && instanceTypes.filter(isWindowsSupportedInstanceType).length < instanceTypes.length) { throw new Error('The specified instanceType does not support Windows workloads. ' @@ -615,8 +615,8 @@ const gpuAmiTypes: NodegroupAmiType[] = [ * @param instanceType The EC2 instance type */ function isWindowsSupportedInstanceType(instanceType: InstanceType): boolean { - //compare instanceType to forbidden InstanceTypes for Windows. Add exception for m6a.16xlarge. - //NOTE: i2 instance class is not present in the InstanceClass enum. + // compare instanceType to forbidden InstanceTypes for Windows. Add exception for m6a.16xlarge. + // NOTE: i2 instance class is not present in the InstanceClass enum. const forbiddenInstanceClasses: InstanceClass[] = [InstanceClass.C3, InstanceClass.C4, InstanceClass.D2, InstanceClass.M4, InstanceClass.M6A, InstanceClass.R3]; return instanceType.toString() === InstanceType.of(InstanceClass.M4, InstanceSize.XLARGE16).toString() || diff --git a/packages/aws-cdk-lib/aws-eks/lib/private/nodegroup.ts b/packages/aws-cdk-lib/aws-eks/lib/private/nodegroup.ts index f924c2b9db5ec..633537bb33c00 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/private/nodegroup.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/private/nodegroup.ts @@ -4,7 +4,7 @@ import { InstanceClass, InstanceSize, InstanceType } from '../../../aws-ec2'; * @param instanceType The EC2 instance type */ export function isGpuInstanceType(instanceType: InstanceType): boolean { - //compare instanceType to known GPU InstanceTypes + // compare instanceType to known GPU InstanceTypes const knownGpuInstanceTypes = [InstanceClass.P2, InstanceClass.P3, InstanceClass.P3DN, InstanceClass.P4DE, InstanceClass.P4D, InstanceClass.G3S, InstanceClass.G3, InstanceClass.G4DN, InstanceClass.G4AD, InstanceClass.G5, InstanceClass.G5G, InstanceClass.G6, InstanceClass.G6E, InstanceClass.INF1, InstanceClass.INF2]; diff --git a/packages/aws-cdk-lib/aws-eks/test/fargate.test.ts b/packages/aws-cdk-lib/aws-eks/test/fargate.test.ts index bb843cba4f5af..5933b2c1923b8 100644 --- a/packages/aws-cdk-lib/aws-eks/test/fargate.test.ts +++ b/packages/aws-cdk-lib/aws-eks/test/fargate.test.ts @@ -446,7 +446,7 @@ describe('fargate', () => { ], }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('Custom::AWSCDK-EKS-Cluster', { Config: { logging: { diff --git a/packages/aws-cdk-lib/aws-eks/test/helm-chart.test.ts b/packages/aws-cdk-lib/aws-eks/test/helm-chart.test.ts index 1f2d6633624a5..edd48511af95c 100644 --- a/packages/aws-cdk-lib/aws-eks/test/helm-chart.test.ts +++ b/packages/aws-cdk-lib/aws-eks/test/helm-chart.test.ts @@ -213,24 +213,24 @@ describe('helm chart', () => { }); test('should enable atomic operations when specified', () => { - //GIVEN + // GIVEN const { stack, cluster } = testFixtureCluster(); - //WHEN + // WHEN new eks.HelmChart(stack, 'MyAtomicChart', { cluster, chart: 'chart', atomic: true }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties(eks.HelmChart.RESOURCE_TYPE, { Atomic: true }); }); test('should disable atomic operations by default', () => { - //GIVEN + // GIVEN const { stack, cluster } = testFixtureCluster(); - //WHEN + // WHEN new eks.HelmChart(stack, 'MyAtomicChart', { cluster, chart: 'chart' }); - //THEN + // THEN const charts = Template.fromStack(stack).findResources(eks.HelmChart.RESOURCE_TYPE, { Atomic: true }); expect(Object.keys(charts).length).toEqual(0); diff --git a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/conditions.test.ts b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/conditions.test.ts index e7d1bccab934b..d24b2b0a979cd 100644 --- a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/conditions.test.ts +++ b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/conditions.test.ts @@ -3,10 +3,10 @@ import * as elbv2 from '../../lib'; describe('tests', () => { test('pathPatterns length greater than 5 will throw exception', () => { - //GIVEN + // GIVEN const array = ['/u1', '/u2', '/u3', '/u4', '/u5']; - //WHEN + // WHEN elbv2.ListenerCondition.pathPatterns(array); // Does not throw array.push('/u6'); diff --git a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts index 4904308a3f2e4..855b15f6cb6da 100644 --- a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts +++ b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts @@ -391,7 +391,7 @@ describe('tests', () => { // WHEN lb.logAccessLogs(bucket); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: Match.arrayWith([ { @@ -533,7 +533,7 @@ describe('tests', () => { }); test('bucket with KMS throws validation error', () => { - //GIVEN + // GIVEN const { stack, bucket, lb } = loggingSetup(true); // WHEN @@ -729,7 +729,7 @@ describe('tests', () => { // WHEN lb.logConnectionLogs(bucket); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: Match.arrayWith([ { @@ -871,7 +871,7 @@ describe('tests', () => { }); test('bucket with KMS throws validation error', () => { - //GIVEN + // GIVEN const { stack, bucket, lb } = loggingSetup(true); // WHEN diff --git a/packages/aws-cdk-lib/aws-lambda-event-sources/test/dynamo.test.ts b/packages/aws-cdk-lib/aws-lambda-event-sources/test/dynamo.test.ts index 058aa3d1ce35c..2a4a9833088ab 100644 --- a/packages/aws-cdk-lib/aws-lambda-event-sources/test/dynamo.test.ts +++ b/packages/aws-cdk-lib/aws-lambda-event-sources/test/dynamo.test.ts @@ -916,7 +916,7 @@ describe('DynamoEventSource', () => { enabled: false, })); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::EventSourceMapping', { 'Enabled': false, }); @@ -945,7 +945,7 @@ describe('DynamoEventSource', () => { startingPosition: lambda.StartingPosition.LATEST, onFailure: s3OnFailureDestination, })); - //THEN + // THEN }).toThrow('S3 onFailure Destination is not supported for this event source'); }); @@ -1020,7 +1020,7 @@ describe('DynamoEventSource', () => { }, })); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::EventSourceMapping', { 'Enabled': false, MetricsConfig: { @@ -1050,7 +1050,7 @@ describe('DynamoEventSource', () => { }, })); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::EventSourceMapping', { 'Enabled': false, MetricsConfig: { diff --git a/packages/aws-cdk-lib/aws-lambda-event-sources/test/kinesis.test.ts b/packages/aws-cdk-lib/aws-lambda-event-sources/test/kinesis.test.ts index 19b2cb57ce920..381c750dfe342 100644 --- a/packages/aws-cdk-lib/aws-lambda-event-sources/test/kinesis.test.ts +++ b/packages/aws-cdk-lib/aws-lambda-event-sources/test/kinesis.test.ts @@ -326,7 +326,7 @@ describe('KinesisEventSource', () => { startingPositionTimestamp: 1640995200, onFailure: s3OnFailureDestination, })); - //THEN + // THEN }).toThrow('S3 onFailure Destination is not supported for this event source'); }); diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/test/deactivated-integ-tests/dependencies-pnpm.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/test/deactivated-integ-tests/dependencies-pnpm.ts index 1101d02d8eaec..986fb544052c1 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/test/deactivated-integ-tests/dependencies-pnpm.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/test/deactivated-integ-tests/dependencies-pnpm.ts @@ -1,4 +1,4 @@ -/*import * as path from 'path'; +/* import * as path from 'path'; import { Runtime } from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; import * as integ from '@aws-cdk/integ-tests'; diff --git a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts index a3252bf534429..33746d979bd09 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts @@ -3490,7 +3490,7 @@ describe('function', () => { test('function using SnapStart', () => { const stack = new cdk.Stack(); - //WHEN + // WHEN new lambda.Function(stack, 'MyLambda', { code: lambda.Code.fromAsset(path.join(__dirname, 'handler.zip')), handler: 'example.Handler::handleRequest', @@ -3498,7 +3498,7 @@ describe('function', () => { snapStart: lambda.SnapStartConf.ON_PUBLISHED_VERSIONS, }); - //THEN + // THEN Template.fromStack(stack).hasResource('AWS::Lambda::Function', { Properties: { @@ -3524,7 +3524,7 @@ describe('function', () => { test('arm64 function using snapStart', () => { const stack = new cdk.Stack(); - //WHEN + // WHEN new lambda.Function(stack, 'MyLambda', { code: lambda.Code.fromAsset(path.join(__dirname, 'handler.zip')), handler: 'example.Handler::handleRequest', @@ -3533,7 +3533,7 @@ describe('function', () => { snapStart: lambda.SnapStartConf.ON_PUBLISHED_VERSIONS, }); - //THEN + // THEN Template.fromStack(stack).hasResource('AWS::Lambda::Function', { Properties: { diff --git a/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts b/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts index 98af2ff4a0837..ac553963e6093 100644 --- a/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts +++ b/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts @@ -200,7 +200,7 @@ class LogRetentionFunction extends Construct implements cdk.ITaggable { public grantDeleteLogGroup(logGroupName: string) { this.role.addToPrincipalPolicy(new iam.PolicyStatement({ actions: ['logs:DeleteLogGroup'], - //Only allow deleting the specific log group. + // Only allow deleting the specific log group. resources: [cdk.Stack.of(this).formatArn({ service: 'logs', resource: 'log-group', diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts index 0bf7010718a43..df7b097c537c9 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts @@ -1730,7 +1730,7 @@ export class PostgresEngineVersion { public static readonly VER_16_4 = PostgresEngineVersion.of('16.4', '16', { s3Import: true, s3Export: true }); /** Version "16.5". */ public static readonly VER_16_5 = PostgresEngineVersion.of('16.5', '16', { s3Import: true, s3Export: true }); - /**Version "16.6" */ + /** Version "16.6" */ public static readonly VER_16_6 = PostgresEngineVersion.of('16.6', '16', { s3Import: true, s3Export: true }); /** Version "17" (only a major version, without a specific minor version). */ diff --git a/packages/aws-cdk-lib/aws-rds/test/cluster.test.ts b/packages/aws-cdk-lib/aws-rds/test/cluster.test.ts index ce16e4fd5dfc2..4677d27e32593 100644 --- a/packages/aws-cdk-lib/aws-rds/test/cluster.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/cluster.test.ts @@ -922,11 +922,11 @@ describe('cluster new api', () => { describe('instanceIdentifiers', () => { test('should contain writer and reader instance IDs', () => { - //GIVEN + // GIVEN const stack = testStack(); const vpc = new ec2.Vpc(stack, 'VPC'); - //WHEN + // WHEN const cluster = new DatabaseCluster(stack, 'Database', { engine: DatabaseClusterEngine.AURORA_MYSQL, vpc, @@ -935,7 +935,7 @@ describe('cluster new api', () => { iamAuthentication: true, }); - //THEN + // THEN expect(cluster.instanceIdentifiers).toHaveLength(2); expect(stack.resolve(cluster.instanceIdentifiers[0])).toEqual({ Ref: 'Databasewriter2462CC03', @@ -945,11 +945,11 @@ describe('cluster new api', () => { describe('instanceEndpoints', () => { test('should contain writer and reader instance endpoints at DatabaseCluster', () => { - //GIVEN + // GIVEN const stack = testStack(); const vpc = new ec2.Vpc(stack, 'VPC'); - //WHEN + // WHEN const cluster = new DatabaseCluster(stack, 'Database', { engine: DatabaseClusterEngine.AURORA_MYSQL, vpc, @@ -958,7 +958,7 @@ describe('cluster new api', () => { iamAuthentication: true, }); - //THEN + // THEN expect(cluster.instanceEndpoints).toHaveLength(2); expect(stack.resolve(cluster.instanceEndpoints)).toEqual([{ hostname: { @@ -992,11 +992,11 @@ describe('cluster new api', () => { }); test('should contain writer and reader instance endpoints at DatabaseClusterFromSnapshot', () => { - //GIVEN + // GIVEN const stack = testStack(); const vpc = new ec2.Vpc(stack, 'VPC'); - //WHEN + // WHEN const cluster = new DatabaseClusterFromSnapshot(stack, 'Database', { engine: DatabaseClusterEngine.AURORA_MYSQL, vpc, @@ -1006,7 +1006,7 @@ describe('cluster new api', () => { readers: [ClusterInstance.serverlessV2('reader')], }); - //THEN + // THEN expect(cluster.instanceEndpoints).toHaveLength(2); expect(stack.resolve(cluster.instanceEndpoints)).toEqual([{ hostname: { diff --git a/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts b/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts index 47c5774656def..c860d7bf23180 100644 --- a/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts @@ -487,7 +487,7 @@ describe('proxy', () => { }, }); - //WHEN + // WHEN new rds.DatabaseProxy(stack, 'proxy', { proxyTarget: rds.ProxyTarget.fromCluster(cluster), secrets: [cluster.secret!], @@ -519,7 +519,7 @@ describe('proxy', () => { }, }); - //WHEN + // WHEN cluster.addProxy('Proxy', { vpc, secrets: [cluster.secret!], @@ -567,7 +567,7 @@ describe('proxy', () => { readers: [rds.ClusterInstance.provisioned('reader')], }); - //WHEN + // WHEN new rds.DatabaseProxy(stack, 'proxy', { proxyTarget: rds.ProxyTarget.fromCluster(cluster), secrets: [cluster.secret!], @@ -599,7 +599,7 @@ describe('proxy', () => { readers: [rds.ClusterInstance.provisioned('reader')], }); - //WHEN + // WHEN cluster.addProxy('Proxy', { vpc, secrets: [cluster.secret!], diff --git a/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts b/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts index 2feff6668c412..5db3cbbaf6e18 100644 --- a/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts @@ -465,7 +465,7 @@ describe('serverless cluster', () => { }, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { ScalingConfiguration: { AutoPause: true, @@ -488,7 +488,7 @@ describe('serverless cluster', () => { enableDataApi: true, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { EnableHttpEndpoint: true, }); @@ -506,7 +506,7 @@ describe('serverless cluster', () => { scaling: {}, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { ScalingConfiguration: { AutoPause: true, @@ -528,7 +528,7 @@ describe('serverless cluster', () => { }, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { ScalingConfiguration: { AutoPause: false, @@ -742,7 +742,7 @@ describe('serverless cluster', () => { // WHEN cluster.grantDataApiAccess(user); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { EnableHttpEndpoint: true, }); diff --git a/packages/aws-cdk-lib/aws-s3-deployment/test/bucket-deployment.test.ts b/packages/aws-cdk-lib/aws-s3-deployment/test/bucket-deployment.test.ts index 6f6738117ed52..886102419b05f 100644 --- a/packages/aws-cdk-lib/aws-s3-deployment/test/bucket-deployment.test.ts +++ b/packages/aws-cdk-lib/aws-s3-deployment/test/bucket-deployment.test.ts @@ -251,7 +251,7 @@ test('AWS_CA_BUNDLE is set', () => { destinationBucket: bucket, }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { Environment: { Variables: { @@ -274,7 +274,7 @@ test('deploy from a local .zip file when efs is enabled', () => { vpc: new ec2.Vpc(stack, 'Vpc'), }); - //THEN + // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { Environment: { Variables: { diff --git a/packages/aws-cdk-lib/aws-servicecatalog/test/portfolio.test.ts b/packages/aws-cdk-lib/aws-servicecatalog/test/portfolio.test.ts index bde6ccac3f17e..a306f9ba7e56d 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/test/portfolio.test.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/test/portfolio.test.ts @@ -365,7 +365,7 @@ describe('portfolio associations and product constraints', () => { portfolio.addProduct(product); portfolio.addProduct(product); // If not idempotent these calls should fail - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::PortfolioProductAssociation', 1); //check anyway + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::PortfolioProductAssociation', 1); // check anyway }), test('add tag options to portfolio', () => { @@ -378,7 +378,7 @@ describe('portfolio associations and product constraints', () => { portfolio.associateTagOptions(tagOptions); - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }), @@ -396,7 +396,7 @@ describe('portfolio associations and product constraints', () => { tagOptions: tagOptions, }); - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }), @@ -411,7 +411,7 @@ describe('portfolio associations and product constraints', () => { portfolio.associateTagOptions(tagOptions); portfolio.associateTagOptions(tagOptions); // If not idempotent this would fail - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }), diff --git a/packages/aws-cdk-lib/aws-servicecatalog/test/product-stack.test.ts b/packages/aws-cdk-lib/aws-servicecatalog/test/product-stack.test.ts index 1e642bb53f51f..d7219d349cd3c 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/test/product-stack.test.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/test/product-stack.test.ts @@ -123,7 +123,7 @@ describe('ProductStack', () => { // WHEN app.synth(); - //THEN + // THEN const template = JSON.parse(fs.readFileSync(path.join(portfolioStage.outdir, templateFileUrl), 'utf-8')); Template.fromJSON(template).hasResourceProperties('AWS::Lambda::Function', { Code: { diff --git a/packages/aws-cdk-lib/aws-servicecatalog/test/product.test.ts b/packages/aws-cdk-lib/aws-servicecatalog/test/product.test.ts index 0d19306ea1473..041ad6209004c 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/test/product.test.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/test/product.test.ts @@ -457,7 +457,7 @@ describe('Product', () => { product.associateTagOptions(tagOptions); - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }), @@ -480,7 +480,7 @@ describe('Product', () => { tagOptions: tagOptions, }); - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }), @@ -495,7 +495,7 @@ describe('Product', () => { product.associateTagOptions(tagOptions); product.associateTagOptions(tagOptions); // If not idempotent this would fail - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 3); }); }); diff --git a/packages/aws-cdk-lib/aws-servicecatalog/test/tag-option.test.ts b/packages/aws-cdk-lib/aws-servicecatalog/test/tag-option.test.ts index 3bf860999de7a..f53590dc46baa 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/test/tag-option.test.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/test/tag-option.test.ts @@ -160,7 +160,7 @@ describe('TagOptions', () => { portfolio.associateTagOptions(tagOptions); product.associateTagOptions(tagOptions); - Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); //Generates a resource for each unique key-value pair + Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOption', 3); // Generates a resource for each unique key-value pair Template.fromStack(stack).resourceCountIs('AWS::ServiceCatalog::TagOptionAssociation', 6); }); diff --git a/packages/aws-cdk-lib/aws-sns/test/subscription.test.ts b/packages/aws-cdk-lib/aws-sns/test/subscription.test.ts index 8ad1aecb755db..4ee7b04a08de8 100644 --- a/packages/aws-cdk-lib/aws-sns/test/subscription.test.ts +++ b/packages/aws-cdk-lib/aws-sns/test/subscription.test.ts @@ -425,7 +425,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', protocol: sns.SubscriptionProtocol.FIREHOSE, @@ -446,7 +446,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: { @@ -467,7 +467,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: { @@ -532,7 +532,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: invalidDeliveryPolicy, @@ -547,7 +547,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: { @@ -640,7 +640,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: invalidDeliveryPolicy, @@ -654,7 +654,7 @@ describe('Subscription', () => { const stack = new cdk.Stack(); const topic = new sns.Topic(stack, 'Topic'); - //THEN + // THEN expect(() => new sns.Subscription(stack, 'Subscription', { endpoint: 'endpoint', deliveryPolicy: { diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts index d8f34618cafe5..2108ebc6b5c79 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts @@ -171,7 +171,7 @@ export class BedrockInvokeModel extends sfn.TaskStateBase { if (!useNewS3UriParamsForTask) { isInputSpecified = (props.input !== undefined && props.input.s3Location !== undefined) || (props.inputPath !== undefined); } else { - //Either specific props.input with bucket name and object key or input s3 path + // Either specific props.input with bucket name and object key or input s3 path isInputSpecified = props.input!==undefined ? props.input?.s3Location !== undefined || props.input?.s3InputUri !== undefined : false; } @@ -194,7 +194,7 @@ export class BedrockInvokeModel extends sfn.TaskStateBase { throw new Error('S3 Uri cannot be an empty string'); } - //Warning to let users know about the newly introduced props + // Warning to let users know about the newly introduced props if (props.inputPath || props.outputPath && !useNewS3UriParamsForTask) { Annotations.of(scope).addWarningV2('aws-cdk-lib/aws-stepfunctions-taks', 'These props will set the value of inputPath/outputPath as s3 URI under input/output field in state machine JSON definition. To modify the behaviour set feature flag `@aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask": true` and use props input.s3InputUri/output.s3OutputUri'); @@ -212,7 +212,7 @@ export class BedrockInvokeModel extends sfn.TaskStateBase { }), ]; - //For Compatibility with existing behaviour of input path + // For Compatibility with existing behaviour of input path if (this.props.input?.s3InputUri !== undefined || (!useNewS3UriParamsForTask && this.props.inputPath !== undefined)) { policyStatements.push( new iam.PolicyStatement({ @@ -244,7 +244,7 @@ export class BedrockInvokeModel extends sfn.TaskStateBase { ); } - //For Compatibility with existing behaviour of output path + // For Compatibility with existing behaviour of output path if (this.props.output?.s3OutputUri !== undefined || (!useNewS3UriParamsForTask && this.props.outputPath !== undefined)) { policyStatements.push( new iam.PolicyStatement({ diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/bedrock/invoke-model.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/bedrock/invoke-model.test.ts index 869be41943937..83537ec7b1639 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/bedrock/invoke-model.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/bedrock/invoke-model.test.ts @@ -239,8 +239,8 @@ describe('Invoke Model', () => { Parameters: { ModelId: 'arn:aws:bedrock:us-turbo-2:123456789012:provisioned-model/abc-123', Input: { - //Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation - //Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html + // Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation + // Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html 'S3Uri.$': '$.prompt', }, Output: { @@ -288,8 +288,8 @@ describe('Invoke Model', () => { Parameters: { ModelId: 'arn:aws:bedrock:us-turbo-2:123456789012:provisioned-model/abc-123', Input: { - //Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation - //Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html + // Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation + // Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html 'S3Uri.$': '$.prompt', }, Output: { @@ -299,7 +299,7 @@ describe('Invoke Model', () => { }); }); - //Should not throw an error for input path and body if feature flag is set to true + // Should not throw an error for input path and body if feature flag is set to true test('validation for input and body correctly with feature flag set to true', () => { const app = new cdk.App({ context: { [cxapi.USE_NEW_S3URI_PARAMETERS_FOR_BEDROCK_INVOKE_MODEL_TASK]: true } }); const stack = new cdk.Stack(app); @@ -383,8 +383,8 @@ describe('Invoke Model', () => { Parameters: { ModelId: 'arn:aws:bedrock:us-turbo-2:123456789012:provisioned-model/abc-123', Input: { - //Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation - //Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html + // Expected key modified from S3Uri to S3Uri.$ as per the State Machine context key field transformation + // Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html 'S3Uri.$': '$.prompt', }, Output: { diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/eks/call.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/eks/call.test.ts index 184d51835149e..4744acbd3b0ed 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/eks/call.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/eks/call.test.ts @@ -7,7 +7,7 @@ let stack: Stack; let cluster: eks.Cluster; beforeEach(() => { - //GIVEN + // GIVEN stack = new Stack(); cluster = new eks.Cluster(stack, 'Cluster', { version: eks.KubernetesVersion.V1_21, diff --git a/packages/aws-cdk-lib/aws-stepfunctions/test/distributed-map.test.ts b/packages/aws-cdk-lib/aws-stepfunctions/test/distributed-map.test.ts index 34e4428ae276f..ef170dcb51a1b 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions/test/distributed-map.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions/test/distributed-map.test.ts @@ -9,7 +9,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemsPath: stepfunctions.JsonPath.stringAt('$.inputForMap'), @@ -171,7 +171,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const readerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemReader: new stepfunctions.S3ObjectsItemReader({ @@ -186,7 +186,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -242,7 +242,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const readerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemReader: new stepfunctions.S3JsonItemReader({ @@ -256,7 +256,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -312,7 +312,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const readerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemReader: new stepfunctions.S3CsvItemReader({ @@ -327,7 +327,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -384,7 +384,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const readerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemReader: new stepfunctions.S3CsvItemReader({ @@ -399,7 +399,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -457,7 +457,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const readerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemReader: new stepfunctions.S3ManifestItemReader({ @@ -471,7 +471,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -526,7 +526,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { itemReader: new stepfunctions.S3ManifestItemReader({ bucketNamePath: stepfunctions.JsonPath.stringAt('$.bucketName'), @@ -535,7 +535,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -584,7 +584,7 @@ describe('Distributed Map State', () => { const stack = new cdk.Stack(); const writerBucket = new s3.Bucket(stack, 'TestBucket'); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { maxConcurrency: 1, itemsPath: stepfunctions.JsonPath.stringAt('$.inputForMap'), @@ -599,7 +599,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -652,7 +652,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { itemsPath: stepfunctions.JsonPath.stringAt('$.inputForMap'), mapExecutionType: stepfunctions.StateMachineType.EXPRESS, @@ -665,7 +665,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -701,7 +701,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { itemsPath: stepfunctions.JsonPath.stringAt('$.inputForMap'), mapExecutionType: stepfunctions.StateMachineType.EXPRESS, @@ -718,7 +718,7 @@ describe('Distributed Map State', () => { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State')); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -892,7 +892,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { }); map.itemProcessor(new stepfunctions.Pass(stack, 'Pass State'), { @@ -900,7 +900,7 @@ describe('Distributed Map State', () => { executionType: stepfunctions.ProcessorType.EXPRESS, }); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { @@ -931,7 +931,7 @@ describe('Distributed Map State', () => { // GIVEN const stack = new cdk.Stack(); - //WHEN + // WHEN const map = new stepfunctions.DistributedMap(stack, 'Map State', { mapExecutionType: stepfunctions.StateMachineType.EXPRESS, }); @@ -940,7 +940,7 @@ describe('Distributed Map State', () => { executionType: stepfunctions.ProcessorType.STANDARD, }); - //THEN + // THEN expect(render(map)).toStrictEqual({ StartAt: 'Map State', States: { diff --git a/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts b/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts index a2849e5c794a6..94755a0734e24 100644 --- a/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts +++ b/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts @@ -628,7 +628,7 @@ export class CfnInclude extends core.CfnElement { if (!this.allowCyclicalReferences) { throw new Error(`Found a cycle between resources in the template: ${cycleChain.join(' depends on ')}`); } - //only allow one placeholder per logical id + // only allow one placeholder per logical id if (this.logicalIdToPlaceholderMap.get(logicalId)) { return this.resources[this.logicalIdToPlaceholderMap.get(logicalId)!]; } diff --git a/packages/aws-cdk-lib/lambda-layer-awscli/test/awscli-layer.test.ts b/packages/aws-cdk-lib/lambda-layer-awscli/test/awscli-layer.test.ts index 4d3dbe94edfcc..92c68a0ae5dcc 100644 --- a/packages/aws-cdk-lib/lambda-layer-awscli/test/awscli-layer.test.ts +++ b/packages/aws-cdk-lib/lambda-layer-awscli/test/awscli-layer.test.ts @@ -3,7 +3,7 @@ import { Stack } from '../../core'; import { AwsCliLayer } from '../lib'; test('synthesized to a layer version', () => { - //GIVEN + // GIVEN const stack = new Stack(); // WHEN diff --git a/packages/aws-cdk-lib/lambda-layer-kubectl/test/kubectl-layer.test.ts b/packages/aws-cdk-lib/lambda-layer-kubectl/test/kubectl-layer.test.ts index f5a78a689d6f9..4eeb072d5014a 100644 --- a/packages/aws-cdk-lib/lambda-layer-kubectl/test/kubectl-layer.test.ts +++ b/packages/aws-cdk-lib/lambda-layer-kubectl/test/kubectl-layer.test.ts @@ -3,7 +3,7 @@ import { Stack } from '../../core'; import { KubectlLayer } from '../lib'; test('synthesized to a layer version', () => { - //GIVEN + // GIVEN const stack = new Stack(); // WHEN diff --git a/packages/aws-cdk-lib/lambda-layer-node-proxy-agent/test/proxy-agent-layer.test.ts b/packages/aws-cdk-lib/lambda-layer-node-proxy-agent/test/proxy-agent-layer.test.ts index 69e022e35899e..b02f2b1124136 100644 --- a/packages/aws-cdk-lib/lambda-layer-node-proxy-agent/test/proxy-agent-layer.test.ts +++ b/packages/aws-cdk-lib/lambda-layer-node-proxy-agent/test/proxy-agent-layer.test.ts @@ -3,7 +3,7 @@ import { Stack } from '../../core'; import { NodeProxyAgentLayer } from '../lib'; test('synthesized to a layer version', () => { - //GIVEN + // GIVEN const stack = new Stack(); // WHEN diff --git a/packages/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.ts b/packages/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.ts index 5732ec0724fd3..bbe32becb3976 100644 --- a/packages/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.ts +++ b/packages/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.ts @@ -335,7 +335,7 @@ function extractStackAssets(stackArtifact: cxapi.CloudFormationStackArtifact): S function s3UrlFromUri(uri: string, region: string | undefined) { // will return something like this - //[ + // [ // 's3:', // '', // 'cdk-hnb659fds-assets-111-${AWS::Region}', diff --git a/packages/aws-cdk-lib/pipelines/test/blueprint/helpers-internal/pipeline-queries.test.ts b/packages/aws-cdk-lib/pipelines/test/blueprint/helpers-internal/pipeline-queries.test.ts index fd7e6ab9d1ccc..ececb9cce6b50 100644 --- a/packages/aws-cdk-lib/pipelines/test/blueprint/helpers-internal/pipeline-queries.test.ts +++ b/packages/aws-cdk-lib/pipelines/test/blueprint/helpers-internal/pipeline-queries.test.ts @@ -80,10 +80,10 @@ describe('pipeline-queries', () => { cases.forEach(testCase => { test(testCase.description, () => { - //WHEN + // WHEN testCase.additionalSetup(); - //THEN + // THEN expect(queries.stackOutputsReferenced(stackDeployment)).toEqual(testCase.expectedResultGetter()); }); }); diff --git a/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts b/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts index da989522c9b63..30eded24968c1 100644 --- a/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts +++ b/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts @@ -2833,7 +2833,7 @@ const ADOT_LAMBDA_LAYER_PYTHON_SDK_ARNS: { [version: string]: { [arch: string]: 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', // 'eu-central-2': 'arn:aws:lambda:eu-central-2:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', - //'eu-south-1': 'arn:aws:lambda:eu-south-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', + // 'eu-south-1': 'arn:aws:lambda:eu-south-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', // 'eu-south-2': 'arn:aws:lambda:eu-south-2:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:3', @@ -3375,8 +3375,8 @@ const ADOT_LAMBDA_LAYER_GENERIC_ARNS: { [version: string]: { [arch: string]: { [ }, '0.88.0': { x86_64: { - //'af-south-1': 'arn:aws:lambda:af-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', - //'ap-east-1': 'arn:aws:lambda:ap-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'af-south-1': 'arn:aws:lambda:af-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'ap-east-1': 'arn:aws:lambda:ap-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', @@ -3387,19 +3387,19 @@ const ADOT_LAMBDA_LAYER_GENERIC_ARNS: { [version: string]: { [arch: string]: { [ // 'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', - //'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', - //'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'eu-central-2': 'arn:aws:lambda:eu-central-2:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', - //'eu-south-1': 'arn:aws:lambda:eu-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'eu-south-1': 'arn:aws:lambda:eu-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'eu-south-2': 'arn:aws:lambda:eu-south-2:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'il-central-1': 'arn:aws:lambda:il-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', // 'me-central-1': 'arn:aws:lambda:me-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', - //'me-south-1': 'arn:aws:lambda:me-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', + // 'me-south-1': 'arn:aws:lambda:me-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-collector-amd64-ver-0-88-0:1', @@ -3419,8 +3419,8 @@ const ADOT_LAMBDA_LAYER_GENERIC_ARNS: { [version: string]: { [arch: string]: { [ // 'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', // 'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', - //'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', - //'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', + // 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', + // 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', // 'eu-central-2': 'arn:aws:lambda:eu-central-2:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-collector-arm64-ver-0-88-0:1', diff --git a/packages/aws-cdk/.eslintrc.js b/packages/aws-cdk/.eslintrc.js index 99cd8d797443e..aa443710b1081 100644 --- a/packages/aws-cdk/.eslintrc.js +++ b/packages/aws-cdk/.eslintrc.js @@ -12,4 +12,8 @@ baseConfig.overrides.push({ }, }); +// TODO: turn these on +// ignoring new eslint rules until CLI refactor is complete +baseConfig.rules["@stylistic/spaced-comment"] = "off"; + module.exports = baseConfig; diff --git a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js index ff7c609c9d71a..63d79fa28842d 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js +++ b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js @@ -72,6 +72,7 @@ module.exports = { 'space-before-blocks': 'error', // require space before blocks 'curly': ['error', 'multi-line', 'consistent'], // require curly braces for multiline control statements 'eol-last': ['error', 'always'], // require a newline a the end of files + '@stylistic/spaced-comment': ['error', 'always', { 'exceptions': ['/', '*'], 'markers': ['/'] }], // require a whitespace at the beginninng of each comment '@stylistic/padded-blocks': ['error', { 'classes': 'never' }], // Require all imported dependencies are actually declared in package.json