Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ITransitGatewayRouteTable } from './transit-gateway-route-table';
import { CfnTransitGatewayRouteTableAssociation } from 'aws-cdk-lib/aws-ec2';
import { Construct } from 'constructs';
import { ITransitGatewayAssociation, TransitGatewayAssociationBase } from './transit-gateway-association';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents a Transit Gateway Route Table Association.
Expand Down Expand Up @@ -44,6 +45,8 @@ export class TransitGatewayRouteTableAssociation extends TransitGatewayAssociati

constructor(scope: Construct, id: string, props: TransitGatewayRouteTableAssociationProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const resource = new CfnTransitGatewayRouteTableAssociation(this, id, {
transitGatewayAttachmentId: props.transitGatewayVpcAttachment.transitGatewayAttachmentId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CfnTransitGatewayRouteTablePropagation } from 'aws-cdk-lib/aws-ec2';
import { Construct } from 'constructs';
import { ITransitGatewayAttachment } from './transit-gateway-attachment';
import { ITransitGatewayRouteTable } from './transit-gateway-route-table';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents a Transit Gateway Route Table Propagation.
Expand Down Expand Up @@ -50,6 +51,8 @@ export class TransitGatewayRouteTablePropagation extends Resource implements ITr

constructor(scope: Construct, id: string, props: TransitGatewayRouteTablePropagationProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const resource = new CfnTransitGatewayRouteTablePropagation(this, id, {
transitGatewayAttachmentId: props.transitGatewayVpcAttachment.transitGatewayAttachmentId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ITransitGatewayAttachment } from './transit-gateway-attachment';
import { TransitGatewayRoute, TransitGatewayBlackholeRoute, ITransitGatewayRoute } from './transit-gateway-route';
import { ITransitGatewayRouteTableAssociation, TransitGatewayRouteTableAssociation } from './transit-gateway-route-table-association';
import { ITransitGatewayRouteTablePropagation, TransitGatewayRouteTablePropagation } from './transit-gateway-route-table-propagation';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents a Transit Gateway Route Table.
Expand Down Expand Up @@ -109,6 +110,8 @@ export class TransitGatewayRouteTable extends TransitGatewayRouteTableBase {

constructor(scope: Construct, id: string, props: TransitGatewayRouteTableProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const resource = new CfnTransitGatewayRouteTable(this, id, {
transitGatewayId: props.transitGateway.transitGatewayId,
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-ec2-alpha/lib/transit-gateway-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Construct } from 'constructs';
import { CfnTransitGatewayRoute } from 'aws-cdk-lib/aws-ec2';
import { ITransitGatewayRouteTable } from './transit-gateway-route-table';
import { ITransitGatewayAttachment } from './transit-gateway-attachment';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents a Transit Gateway Route.
Expand Down Expand Up @@ -87,6 +88,8 @@ export class TransitGatewayRoute extends TransitGatewayRouteBase {

constructor(scope: Construct, id: string, props: TransitGatewayRouteProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.resource = new CfnTransitGatewayRoute(this, 'TransitGatewayRoute', {
blackhole: false,
Expand All @@ -112,6 +115,8 @@ export class TransitGatewayBlackholeRoute extends TransitGatewayRouteBase {

constructor(scope: Construct, id: string, props: TransitGatewayBlackholeRouteProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const resource = new CfnTransitGatewayRoute(this, id, {
blackhole: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ITransitGatewayAttachment, TransitGatewayAttachmentBase } from './trans
import { getFeatureStatus } from './util';
import { ITransitGatewayRouteTable } from './transit-gateway-route-table';
import { Annotations } from 'aws-cdk-lib';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Options for Transit Gateway VPC Attachment.
Expand Down Expand Up @@ -131,6 +132,8 @@ export class TransitGatewayVpcAttachment extends TransitGatewayAttachmentBase im

constructor(scope: Construct, id: string, props: TransitGatewayVpcAttachmentProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this._resource = new CfnTransitGatewayAttachment(this, id, {
subnetIds: props.subnets.map((subnet) => subnet.subnetId),
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-ec2-alpha/lib/transit-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { IRouteTarget } from './route';
import { TransitGatewayRouteTableAssociation } from './transit-gateway-route-table-association';
import { TransitGatewayRouteTablePropagation } from './transit-gateway-route-table-propagation';
import { getFeatureStatus, TransitGatewayFeatureStatus } from './util';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents a Transit Gateway.
Expand Down Expand Up @@ -222,6 +223,8 @@ export class TransitGateway extends TransitGatewayBase {

constructor(scope: Construct, id: string, props: TransitGatewayProps = {}) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const resource = new CfnTransitGateway(this, id, {
amazonSideAsn: props.amazonSideAsn ?? undefined,
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/access-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CfnAccessEntry } from 'aws-cdk-lib/aws-eks';
import {
Resource, IResource, Aws, Lazy,
} from 'aws-cdk-lib/core';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents an access entry in an Amazon EKS cluster.
Expand Down Expand Up @@ -325,6 +326,8 @@ export class AccessEntry extends Resource implements IAccessEntry {

constructor(scope: Construct, id: string, props: AccessEntryProps ) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.cluster = props.cluster;
this.principal = props.principal;
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Construct } from 'constructs';
import { ICluster } from './cluster';
import { CfnAddon } from 'aws-cdk-lib/aws-eks';
import { ArnFormat, IResource, Resource, Stack, Fn } from 'aws-cdk-lib/core';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Represents an Amazon EKS Add-On.
Expand Down Expand Up @@ -127,6 +128,8 @@ export class Addon extends Resource implements IAddon {
super(scope, id, {
physicalName: props.addonName,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.clusterName = props.cluster.clusterName;
this.addonName = props.addonName;
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as kms from 'aws-cdk-lib/aws-kms';
import * as ssm from 'aws-cdk-lib/aws-ssm';
import { Annotations, CfnOutput, CfnResource, IResource, Resource, Tags, Token, Duration, ArnComponents } from 'aws-cdk-lib/core';
import { CfnCluster } from 'aws-cdk-lib/aws-eks';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

// defaults are based on https://eksctl.io
const DEFAULT_CAPACITY_COUNT = 2;
Expand Down Expand Up @@ -1026,6 +1027,8 @@ export class Cluster extends ClusterBase {
super(scope, id, {
physicalName: props.clusterName,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.prune = props.prune ?? true;
this.vpc = props.vpc || new ec2.Vpc(this, 'DefaultVpc');
Expand Down Expand Up @@ -1706,6 +1709,8 @@ class ImportedCluster extends ClusterBase {

constructor(scope: Construct, id: string, private readonly props: ClusterAttributes) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.clusterName = props.clusterName;
this.clusterArn = this.stack.formatArn(clusterArnComponents(props.clusterName));
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/fargate-cluster.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Construct } from 'constructs';
import { Cluster, ClusterCommonOptions, CoreDnsComputeType } from './cluster';
import { FargateProfile, FargateProfileOptions } from './fargate-profile';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Configuration props for EKS Fargate.
Expand Down Expand Up @@ -35,6 +36,8 @@ export class FargateCluster extends Cluster {
coreDnsComputeType: props.coreDnsComputeType ?? CoreDnsComputeType.FARGATE,
version: props.version,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.defaultProfile = this.addFargateProfile(
props.defaultProfile?.fargateProfileName ?? (props.defaultProfile ? 'custom' : 'default'),
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IRole, ManagedPolicy, PolicyStatement, Role, ServicePrincipal } from 'a
import { IResource, Resource, Annotations, withResolved, FeatureFlags } from 'aws-cdk-lib/core';
import * as cxapi from 'aws-cdk-lib/cx-api';
import { isGpuInstanceType } from './private/nodegroup';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* NodeGroup interface
Expand Down Expand Up @@ -391,6 +392,8 @@ export class Nodegroup extends Resource implements INodegroup {
super(scope, id, {
physicalName: props.nodegroupName,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

this.cluster = props.cluster;

Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/oidc-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Construct } from 'constructs';
import * as iam from 'aws-cdk-lib/aws-iam';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Initialization properties for `OpenIdConnectProvider`.
Expand Down Expand Up @@ -47,5 +48,7 @@ export class OpenIdConnectProvider extends iam.OpenIdConnectProvider {
url: props.url,
clientIds,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-msk-alpha/lib/serverless-cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Fn, Lazy, Names } from 'aws-cdk-lib';
import * as constructs from 'constructs';
import { ClusterBase, ICluster } from '.';
import { CfnServerlessCluster } from 'aws-cdk-lib/aws-msk';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Properties for a MSK Serverless Cluster
Expand Down Expand Up @@ -82,6 +83,8 @@ export class ServerlessCluster extends ClusterBase {
produce: () => Names.uniqueResourceName(this, { maxLength: 64 }),
}),
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

if (props.vpcConfigs.length < 1 || props.vpcConfigs.length > 5) {
throw Error(`\`vpcConfigs\` must contain between 1 and 5 configurations, got ${props.vpcConfigs.length} configurations.`);
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-appsync/lib/channel-namespace.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { addConstructMetadata } from '../../core/lib/metadata-resource';
import { Construct } from 'constructs';
import { AppSyncEventResource } from './appsync-common';
import { CfnChannelNamespace } from './appsync.generated';
Expand Down Expand Up @@ -131,6 +132,8 @@ export class ChannelNamespace extends Resource implements IChannelNamespace {
super(scope, id, {
physicalName: props.channelNamespaceName ?? id,
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const code = props.code?.bind(this);

Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-appsync/lib/eventapi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { addConstructMetadata } from '../../core/lib/metadata-resource';
import { Construct } from 'constructs';
import { IApi, ApiBase } from './api-base';
import {
Expand Down Expand Up @@ -445,6 +446,8 @@ export class EventApi extends EventApiBase {
}),
}),
});
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

const defaultAuthType: AppSyncAuthorizationType = AppSyncAuthorizationType.API_KEY;
const defaultAuthProviders: AppSyncAuthProvider[] = [{ authorizationType: defaultAuthType }];
Expand Down
Loading