diff --git a/README.md b/README.md index 5f0ebd65..4872a73e 100644 --- a/README.md +++ b/README.md @@ -401,7 +401,8 @@ AWS Organizations has some limitations: > AWS Organizations is a global service with service endpoints in `us-east-1`, `us-gov-west-1` and `cn-northwest-1`. Read also > [Endpoint to call When using the AWS CLI or the AWS SDK](https://docs.aws.amazon.com/organizations/latest/APIReference/Welcome.html). -> Currently all custom resources of this library are hard set to use `us-east-1`. +> Currently all custom resources of this library defaults to use `us-east-1`, but it can be configured to use `cn-northwest-1` +> with the environment variable `CDK_AWS_PARTITION` set to `aws-cn`. ## Example diff --git a/src/account-provider/account-provider.ts b/src/account-provider/account-provider.ts index aaff60b8..b3e40a9c 100644 --- a/src/account-provider/account-provider.ts +++ b/src/account-provider/account-provider.ts @@ -46,7 +46,12 @@ export class AccountProvider extends NestedStack { constructor(scope: Construct, id: string, props: AccountProviderProps) { super(scope, id, props); + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + this.onEventHandler = new OnEventHandlerFunction(this, "OnEventHandlerFunction", { + environment: { + ORGANIZATIONS_ENDPOINT_REGION: organizationsRegion, + }, timeout: Duration.minutes(10), initialPolicy: [ new PolicyStatement({ @@ -57,6 +62,9 @@ export class AccountProvider extends NestedStack { }); this.isCompleteHandler = new IsCompleteHandlerFunction(this, "IsCompleteHandlerFunction", { + environment: { + ORGANIZATIONS_ENDPOINT_REGION: organizationsRegion, + }, timeout: Duration.minutes(1), initialPolicy: [ new PolicyStatement({ diff --git a/src/account-provider/is-complete-handler.lambda.ts b/src/account-provider/is-complete-handler.lambda.ts index a6ec3fd1..a1f94456 100644 --- a/src/account-provider/is-complete-handler.lambda.ts +++ b/src/account-provider/is-complete-handler.lambda.ts @@ -6,6 +6,7 @@ import * as AWS from "aws-sdk"; import { Organizations } from "aws-sdk"; let organizationsClient: AWS.Organizations; +const organizationsRegion = process.env.ORGANIZATIONS_ENDPOINT_REGION ?? "us-east-1"; /** * The isComplete handler is repeatedly invoked checking CreateAccountStatus until SUCCEEDED or FAILED. @@ -15,7 +16,7 @@ export async function handler(event: IsCompleteRequest): Promise { console.log(`Request of type ${event.RequestType} received`); if (!organizationsClient) { - organizationsClient = new Organizations({ region: "us-east-1" }); + organizationsClient = new Organizations({ region: organizationsRegion }); } console.log("Payload: %j", event); diff --git a/src/account.ts b/src/account.ts index 51f38fc1..fb701bf5 100644 --- a/src/account.ts +++ b/src/account.ts @@ -159,10 +159,11 @@ export class Account extends Construct implements IAccount, ITaggableResource { * @param {DelegatedAdministratorProps} props additional DelegatedAdministrator props */ public delegateAdministrator(servicePrincipal: string, region?: string, props: Record = {}) { + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; const delegatedAdministrator = new DelegatedAdministrator( this.scope, `Delegate${pascalCase(servicePrincipal)}${ - region && region !== "us-east-1" ? `-${region}` : "" + region && region !== organizationsRegion ? `-${region}` : "" }-${Names.nodeUniqueId(this.node)}`, { ...props, diff --git a/src/delegated-administrator.ts b/src/delegated-administrator.ts index 38cff88f..be45474e 100644 --- a/src/delegated-administrator.ts +++ b/src/delegated-administrator.ts @@ -36,13 +36,14 @@ export class DelegatedAdministrator extends Construct { super(scope, id); const { account, servicePrincipal, region } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; new AwsCustomResource(this, "DelegatedAdministratorCustomResource", { resourceType: "Custom::Organizations_DelegatedAdministrator", onCreate: { service: "Organizations", action: "registerDelegatedAdministrator", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#registerDelegatedAdministrator-property - region: region ?? "us-east-1", + region: region ?? organizationsRegion, physicalResourceId: PhysicalResourceId.of(`${account.accountId}:${servicePrincipal}`), parameters: { AccountId: account.accountId, @@ -56,7 +57,7 @@ export class DelegatedAdministrator extends Construct { onDelete: { service: "Organizations", action: "deregisterDelegatedAdministrator", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#deregisterDelegatedAdministrator-property - region: region ?? "us-east-1", + region: region ?? organizationsRegion, parameters: { AccountId: account.accountId, ServicePrincipal: servicePrincipal, diff --git a/src/enable-aws-service-access.ts b/src/enable-aws-service-access.ts index a5e9122b..cf261a42 100644 --- a/src/enable-aws-service-access.ts +++ b/src/enable-aws-service-access.ts @@ -20,13 +20,14 @@ export class EnableAwsServiceAccess extends Construct { super(scope, id); const { servicePrincipal } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; new AwsCustomResource(this, "EnableAwsServiceAccessCustomResource", { resourceType: "Custom::Organizations_EnableAwsServiceAccess", onCreate: { service: "Organizations", action: "enableAWSServiceAccess", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#enableAWSServiceAccess-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: PhysicalResourceId.of(`${servicePrincipal}`), parameters: { ServicePrincipal: servicePrincipal, @@ -35,7 +36,7 @@ export class EnableAwsServiceAccess extends Construct { onDelete: { service: "Organizations", action: "disableAWSServiceAccess", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#disableAWSServiceAccess-property - region: "us-east-1", + region: organizationsRegion, parameters: { ServicePrincipal: servicePrincipal, }, diff --git a/src/enable-policy-type.ts b/src/enable-policy-type.ts index 1e041704..80effd3d 100644 --- a/src/enable-policy-type.ts +++ b/src/enable-policy-type.ts @@ -18,13 +18,14 @@ export class EnablePolicyType extends Construct { super(scope, id); const { root, policyType } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; new AwsCustomResource(this, "EnablePolicyTypeCustomResource", { resourceType: "Custom::Organizations_EnablePolicyType", onCreate: { service: "Organizations", action: "enablePolicyType", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#enablePolicyType-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: PhysicalResourceId.of(`${root.rootId}:${policyType}`), parameters: { RootId: root.rootId, @@ -35,7 +36,7 @@ export class EnablePolicyType extends Construct { onDelete: { service: "Organizations", action: "disablePolicyType", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#disablePolicyType-property - region: "us-east-1", + region: organizationsRegion, parameters: { RootId: root.rootId, PolicyType: policyType, diff --git a/src/organization-provider/on-event-handler.lambda.ts b/src/organization-provider/on-event-handler.lambda.ts index 9b82d468..d3c67d4d 100644 --- a/src/organization-provider/on-event-handler.lambda.ts +++ b/src/organization-provider/on-event-handler.lambda.ts @@ -2,6 +2,7 @@ import { CdkCustomResourceEvent as OnEventRequest, CdkCustomResourceResponse as import { AWSError, Organizations } from "aws-sdk"; let organizationsClient: Organizations; +const organizationsRegion = process.env.ORGANIZATIONS_ENDPOINT_REGION ?? "us-east-1"; /** * The onEvent handler is invoked whenever a resource lifecycle event for an organization occurs @@ -12,7 +13,7 @@ export async function handler(event: OnEventRequest): Promise { console.log(`Request of type ${event.RequestType} received`); if (!organizationsClient) { - organizationsClient = new Organizations({ region: "us-east-1" }); + organizationsClient = new Organizations({ region: organizationsRegion }); } console.log("Payload: %j", event); diff --git a/src/organization-provider/organization-provider.ts b/src/organization-provider/organization-provider.ts index 6a1a17ec..7b47cea0 100644 --- a/src/organization-provider/organization-provider.ts +++ b/src/organization-provider/organization-provider.ts @@ -1,4 +1,4 @@ -import { Duration, NestedStack, NestedStackProps, Stack } from "aws-cdk-lib"; +import { Aws, Duration, NestedStack, NestedStackProps, Stack } from "aws-cdk-lib"; import { PolicyStatement } from "aws-cdk-lib/aws-iam"; import { Function } from "aws-cdk-lib/aws-lambda"; import { Provider } from "aws-cdk-lib/custom-resources"; @@ -44,7 +44,12 @@ export class OrganizationProvider extends NestedStack { constructor(scope: Construct, id: string, props: OrganizationProviderProps) { super(scope, id, props); + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + this.onEventHandler = new OnEventHandlerFunction(this, "OnEventHandlerFunction", { + environment: { + ORGANIZATIONS_ENDPOINT_REGION: organizationsRegion, + }, timeout: Duration.minutes(10), initialPolicy: [ new PolicyStatement({ @@ -54,7 +59,7 @@ export class OrganizationProvider extends NestedStack { // permit the creation of service-linked role https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_create.html#create-org new PolicyStatement({ actions: ["iam:CreateServiceLinkedRole"], - resources: ["arn:aws:iam::*:role/*"], + resources: [`arn:${Aws.PARTITION}:iam::*:role/*`], }), ], }); diff --git a/src/organization.ts b/src/organization.ts index fe2e9a39..c687b236 100644 --- a/src/organization.ts +++ b/src/organization.ts @@ -98,19 +98,21 @@ export class Organization extends Construct implements IOrganization { public constructor() { super(scope, id); + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + const resource = new custom_resources.AwsCustomResource(scope, "CustomResource", { resourceType: "Custom::Organizations_ImportOrganization", onCreate: { service: "Organizations", action: "describeOrganization", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#describeOrganization-property - region: "us-east-1", + region: organizationsRegion, parameters: {}, physicalResourceId: custom_resources.PhysicalResourceId.fromResponse("Organization.Id"), }, onUpdate: { service: "Organizations", action: "describeOrganization", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#describeOrganization-property - region: "us-east-1", + region: organizationsRegion, parameters: {}, physicalResourceId: custom_resources.PhysicalResourceId.fromResponse("Organization.Id"), }, @@ -227,24 +229,26 @@ export class Root extends Construct implements IParent, IPolicyAttachmentTarget, super(scope, id); this.scope = scope; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + this.resource = new custom_resources.AwsCustomResource(this, "RootCustomResource", { resourceType: "Custom::Organizations_Root", onCreate: { service: "Organizations", action: "listRoots", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listRoots-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: custom_resources.PhysicalResourceId.fromResponse("Roots.0.Id"), }, onUpdate: { service: "Organizations", action: "listRoots", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listRoots-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: custom_resources.PhysicalResourceId.fromResponse("Roots.0.Id"), }, onDelete: { service: "Organizations", action: "listRoots", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listRoots-property - region: "us-east-1", + region: organizationsRegion, }, installLatestAwsSdk: false, policy: custom_resources.AwsCustomResourcePolicy.fromSdkCalls({ diff --git a/src/organizational-unit-provider/on-event-handler.lambda.ts b/src/organizational-unit-provider/on-event-handler.lambda.ts index d58ed137..46398fd1 100644 --- a/src/organizational-unit-provider/on-event-handler.lambda.ts +++ b/src/organizational-unit-provider/on-event-handler.lambda.ts @@ -2,6 +2,7 @@ import { CdkCustomResourceEvent as OnEventRequest, CdkCustomResourceResponse as import { AWSError, Organizations } from "aws-sdk"; let organizationsClient: Organizations; +const organizationsRegion = process.env.ORGANIZATIONS_ENDPOINT_REGION ?? "us-east-1"; /** * The onEvent handler is invoked whenever a resource lifecycle event for an organizational unit occurs @@ -12,7 +13,7 @@ export const handler = async (event: OnEventRequest): Promise = console.log(`Request of type ${event.RequestType} received`); if (!organizationsClient) { - organizationsClient = new Organizations({ region: "us-east-1" }); + organizationsClient = new Organizations({ region: organizationsRegion }); } console.log("Payload: %j", event); diff --git a/src/organizational-unit-provider/organizational-unit-provider.ts b/src/organizational-unit-provider/organizational-unit-provider.ts index 90388602..9689c3f1 100644 --- a/src/organizational-unit-provider/organizational-unit-provider.ts +++ b/src/organizational-unit-provider/organizational-unit-provider.ts @@ -46,7 +46,12 @@ export class OrganizationalUnitProvider extends NestedStack { constructor(scope: Construct, id: string, props: OrganizationalUnitProviderProps) { super(scope, id, props); + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + this.onEventHandler = new OnEventHandlerFunction(this, "OnEventHandlerFunction", { + environment: { + ORGANIZATIONS_ENDPOINT_REGION: organizationsRegion, + }, timeout: Duration.minutes(10), initialPolicy: [ new PolicyStatement({ diff --git a/src/parent.ts b/src/parent.ts index 593e1876..2feb3b95 100644 --- a/src/parent.ts +++ b/src/parent.ts @@ -21,12 +21,13 @@ export abstract class ParentBase extends Construct implements IParent { super(scope, id); const { childId } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; const parent = new AwsCustomResource(this, "ListParentsCustomResource", { onCreate: { service: "Organizations", action: "listParents", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listParents-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: PhysicalResourceId.fromResponse("Parents.0.Id"), parameters: { ChildId: childId, @@ -35,7 +36,7 @@ export abstract class ParentBase extends Construct implements IParent { onUpdate: { service: "Organizations", action: "listParents", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listParents-property - region: "us-east-1", + region: organizationsRegion, physicalResourceId: PhysicalResourceId.fromResponse("Parents.0.Id"), parameters: { ChildId: childId, @@ -44,7 +45,7 @@ export abstract class ParentBase extends Construct implements IParent { onDelete: { service: "Organizations", action: "listParents", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#listParents-property - region: "us-east-1", + region: organizationsRegion, parameters: { ChildId: childId, }, diff --git a/src/policy-attachment.ts b/src/policy-attachment.ts index f022cb6d..65819127 100644 --- a/src/policy-attachment.ts +++ b/src/policy-attachment.ts @@ -24,13 +24,14 @@ export class PolicyAttachment extends Construct { super(scope, id); const { target, policy } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; new AwsCustomResource(this, "CustomResource", { resourceType: "Custom::Organizations_PolicyAttachment", onCreate: { service: "Organizations", action: "attachPolicy", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#attachPolicy-property - region: "us-east-1", + region: organizationsRegion, parameters: { PolicyId: policy.policyId, TargetId: target.identifier(), @@ -40,7 +41,7 @@ export class PolicyAttachment extends Construct { onDelete: { service: "Organizations", action: "detachPolicy", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#detachPolicy-property - region: "us-east-1", + region: organizationsRegion, parameters: { PolicyId: policy.policyId, TargetId: target.identifier(), diff --git a/src/policy.ts b/src/policy.ts index 780e7575..872a8272 100644 --- a/src/policy.ts +++ b/src/policy.ts @@ -80,6 +80,7 @@ export class Policy extends Construct implements IPolicy, ITaggableResource { super(scope, id); const { content, description, policyName, policyType } = props; + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; if (!Validators.of().policyContent(content)) { Annotations.of(this).addError( @@ -92,7 +93,7 @@ export class Policy extends Construct implements IPolicy, ITaggableResource { onCreate: { service: "Organizations", action: "createPolicy", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#createPolicy-property - region: "us-east-1", + region: organizationsRegion, parameters: { Content: content, Description: description, @@ -105,7 +106,7 @@ export class Policy extends Construct implements IPolicy, ITaggableResource { onUpdate: { service: "Organizations", action: "updatePolicy", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#updatePolicy-property - region: "us-east-1", + region: organizationsRegion, parameters: { Content: content, Description: description, @@ -118,7 +119,7 @@ export class Policy extends Construct implements IPolicy, ITaggableResource { onDelete: { service: "Organizations", action: "deletePolicy", // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html#deletePolicy-property - region: "us-east-1", + region: organizationsRegion, parameters: { PolicyId: new PhysicalResourceIdReference(), }, diff --git a/src/tag-resource-provider/on-event-handler.lambda.ts b/src/tag-resource-provider/on-event-handler.lambda.ts index 49a48b4a..727bf91d 100644 --- a/src/tag-resource-provider/on-event-handler.lambda.ts +++ b/src/tag-resource-provider/on-event-handler.lambda.ts @@ -2,6 +2,7 @@ import { CdkCustomResourceEvent as OnEventRequest, CdkCustomResourceResponse as import { Organizations } from "aws-sdk"; let organizationsClient: Organizations; +const organizationsRegion = process.env.ORGANIZATIONS_ENDPOINT_REGION ?? "us-east-1"; /** * The onEvent handler is invoked whenever a resource lifecycle event for a TagResource occurs @@ -12,7 +13,7 @@ export async function handler(event: OnEventRequest): Promise { console.log(`Request of type ${event.RequestType} received`); if (!organizationsClient) { - organizationsClient = new Organizations({ region: "us-east-1" }); + organizationsClient = new Organizations({ region: organizationsRegion }); } console.log("Payload: %j", event); diff --git a/src/tag-resource-provider/tag-resource-provider.ts b/src/tag-resource-provider/tag-resource-provider.ts index 66d0f003..48274326 100644 --- a/src/tag-resource-provider/tag-resource-provider.ts +++ b/src/tag-resource-provider/tag-resource-provider.ts @@ -41,7 +41,12 @@ export class TagResourceProvider extends NestedStack { constructor(scope: Construct, id: string, props: TagResourceProviderProps) { super(scope, id, props); + const organizationsRegion = process.env.CDK_AWS_PARTITION === "aws-cn" ? "cn-northwest-1" : "us-east-1"; + this.onEventHandler = new OnEventHandlerFunction(this, "OnEventHandlerFunction", { + environment: { + ORGANIZATIONS_ENDPOINT_REGION: organizationsRegion, + }, timeout: Duration.minutes(10), initialPolicy: [ new PolicyStatement({ diff --git a/test/__snapshots__/account.test.ts.snap b/test/__snapshots__/account.test.ts.snap index 76cf3c24..0c7f9764 100644 --- a/test/__snapshots__/account.test.ts.snap +++ b/test/__snapshots__/account.test.ts.snap @@ -193,7 +193,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/7ae50027841ef2f97a51eef91fcb045c88387f981533e58c9de888f872989e2a.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/b05f108a456bd9310038c1412939b1e4f5bbcadfd270b2365da3e4a80832fbef.json", ], ], }, @@ -212,7 +212,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -231,7 +231,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/delegated-administrator.test.ts.snap b/test/__snapshots__/delegated-administrator.test.ts.snap index 29f367e0..822b0144 100644 --- a/test/__snapshots__/delegated-administrator.test.ts.snap +++ b/test/__snapshots__/delegated-administrator.test.ts.snap @@ -184,7 +184,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/7ae50027841ef2f97a51eef91fcb045c88387f981533e58c9de888f872989e2a.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/b05f108a456bd9310038c1412939b1e4f5bbcadfd270b2365da3e4a80832fbef.json", ], ], }, @@ -203,7 +203,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/dependency-chain.test.ts.snap b/test/__snapshots__/dependency-chain.test.ts.snap index bffe7b02..2f1cdd7e 100644 --- a/test/__snapshots__/dependency-chain.test.ts.snap +++ b/test/__snapshots__/dependency-chain.test.ts.snap @@ -381,7 +381,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/7ae50027841ef2f97a51eef91fcb045c88387f981533e58c9de888f872989e2a.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/b05f108a456bd9310038c1412939b1e4f5bbcadfd270b2365da3e4a80832fbef.json", ], ], }, @@ -400,7 +400,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -419,7 +419,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, @@ -1028,7 +1028,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/7ae50027841ef2f97a51eef91fcb045c88387f981533e58c9de888f872989e2a.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/b05f108a456bd9310038c1412939b1e4f5bbcadfd270b2365da3e4a80832fbef.json", ], ], }, @@ -1047,7 +1047,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -1066,7 +1066,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/enable-policy-type.test.ts.snap b/test/__snapshots__/enable-policy-type.test.ts.snap index 7abff04d..8b7d3274 100644 --- a/test/__snapshots__/enable-policy-type.test.ts.snap +++ b/test/__snapshots__/enable-policy-type.test.ts.snap @@ -226,7 +226,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -245,7 +245,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/integ.default.test.ts.snap b/test/__snapshots__/integ.default.test.ts.snap index 2f45320b..b3547f9e 100644 --- a/test/__snapshots__/integ.default.test.ts.snap +++ b/test/__snapshots__/integ.default.test.ts.snap @@ -1678,7 +1678,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/410e509c30034a6cae8d1320b39baa9c68e96119014551ad5f21d0acd4fa54cf.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/e537e0a5bc5d4f3e8f708ff907a2b0c167fdfc85dd91a126a8194a7cf87adc9d.json", ], ], }, @@ -1697,7 +1697,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/ed4e80e7a773baee2aa57728f7820f93d3adac8d25b6d14a73af8b49d2671862.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2339f5c43cac2b0d50592bdeb272387497d4c7dfec00ee4bc5d11916cbdf18e3.json", ], ], }, @@ -1716,7 +1716,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/2a8c1c1be1040f6ea85d793a06cbeb4f435aeea7fcce845a08605fe06dd8f57d.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/453c771cfbc833ca67516c87f4fff6672fa4a5781337699c3089ad876315f3a5.json", ], ], }, @@ -1735,7 +1735,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/3ee12be2955ca332a64e5d1c9d1945607e6db92e29cb04163ec8e6a0a2bbb034.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/1bf7ce36ccb8b77d8977fcc66ebbc2a4692119d3e1b6712087d7782b39fd26a0.json", ], ], }, diff --git a/test/__snapshots__/organization.test.ts.snap b/test/__snapshots__/organization.test.ts.snap index 8b25674b..ef73c71e 100644 --- a/test/__snapshots__/organization.test.ts.snap +++ b/test/__snapshots__/organization.test.ts.snap @@ -146,7 +146,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -165,7 +165,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/organizational-unit.test.ts.snap b/test/__snapshots__/organizational-unit.test.ts.snap index 72ab8794..0f776e30 100644 --- a/test/__snapshots__/organizational-unit.test.ts.snap +++ b/test/__snapshots__/organizational-unit.test.ts.snap @@ -198,7 +198,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/36df93481d903a6d5f1b314e99a5886f19fad6eb694c60de67d8b6c33fd76fe4.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/2089be8c8b2e57aef8bfc8cc25ca4174c3e1d74b8d665b9963f04d81a92f35c5.json", ], ], }, @@ -217,7 +217,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/eb1e5cfd8afccfddade452624a25f40e6be7d0fe5160ff92797d86e8f1336542.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/acccdb584cf721114b4c1539022c7cf28c3c2bd080e85cd9b89d64e2743b4dfd.json", ], ], }, @@ -236,7 +236,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/policy-attachment.test.ts.snap b/test/__snapshots__/policy-attachment.test.ts.snap index 2ddd4434..fe9a53c8 100644 --- a/test/__snapshots__/policy-attachment.test.ts.snap +++ b/test/__snapshots__/policy-attachment.test.ts.snap @@ -305,7 +305,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/7ae50027841ef2f97a51eef91fcb045c88387f981533e58c9de888f872989e2a.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/b05f108a456bd9310038c1412939b1e4f5bbcadfd270b2365da3e4a80832fbef.json", ], ], }, @@ -324,7 +324,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/policy.test.ts.snap b/test/__snapshots__/policy.test.ts.snap index f12b69e0..d0946558 100644 --- a/test/__snapshots__/policy.test.ts.snap +++ b/test/__snapshots__/policy.test.ts.snap @@ -137,7 +137,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/a8fbc353a713f63c9e1159c03781e99021638487ae87ad16ec30ac7a42a351e9.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/02ece5c04dee6fcbd3532c20a43a8163b7c39cd9868a821fddca2b4bb1bcf5f4.json", ], ], }, diff --git a/test/__snapshots__/tag-resource.test.ts.snap b/test/__snapshots__/tag-resource.test.ts.snap index 4146b446..a39762ee 100644 --- a/test/__snapshots__/tag-resource.test.ts.snap +++ b/test/__snapshots__/tag-resource.test.ts.snap @@ -28,7 +28,7 @@ Object { Object { "Ref": "AWS::URLSuffix", }, - "/cdk-hnb659fds-assets-123456789012-us-east-1/e6de978e5b06f50f91f09d4674a76c13154c25db058a186cce6c91f92d9afd1d.json", + "/cdk-hnb659fds-assets-123456789012-us-east-1/c972cee412a10c9d825cf8b1b7827abd96544c54bc2208dd1076dde63ca21f1f.json", ], ], },