Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(region-info): EC2 service principal is incorrect in GovCloud regions #22589

Merged
merged 25 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"files": {
"512271f7a4721942ff4cf09cc4e4500d86b0e93fd0a1214307f7caf0a387bbc8": {
"8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa": {
"source": {
"path": "integ-autoscalinghook-queue.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "512271f7a4721942ff4cf09cc4e4500d86b0e93fd0a1214307f7caf0a387bbc8.json",
"objectKey": "8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,7 @@
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ec2.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
"Service": "ec2.amazonaws.com"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/512271f7a4721942ff4cf09cc4e4500d86b0e93fd0a1214307f7caf0a387bbc8.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -286,7 +286,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2952a5f1ee2df6894e782c86d2be1fdd7d53f82d214752f25a6a79e822dabf3e.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
}
}
},
"2952a5f1ee2df6894e782c86d2be1fdd7d53f82d214752f25a6a79e822dabf3e": {
"bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd": {
"source": {
"path": "queuehooktestDefaultTestDeployAssertCF5493DF.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "2952a5f1ee2df6894e782c86d2be1fdd7d53f82d214752f25a6a79e822dabf3e.json",
"objectKey": "bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"DesiredCapacity": 1
},
"flattenResponse": "false",
"salt": "1664821428400"
"salt": "1666982510481"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -133,7 +133,7 @@
}
},
"flattenResponse": "true",
"salt": "1664821428400"
"salt": "1666982510481"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -226,7 +226,7 @@
"Fn::Join": [
"",
[
"{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":360,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"",
"{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":8,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"",
{
"Fn::GetAtt": [
"SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE",
Expand Down Expand Up @@ -385,7 +385,7 @@
}
},
"flattenResponse": "false",
"salt": "1664821428402"
"salt": "1666982510483"
},
"DependsOn": [
"AwsApiCallAutoScalingsetDesiredCapacity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"integ-autoscalinghook-queue": {
Expand Down Expand Up @@ -741,17 +741,7 @@
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ec2.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
"Service": "ec2.amazonaws.com"
}
}
],
Expand Down Expand Up @@ -1039,7 +1029,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
}
},
Expand All @@ -1061,7 +1051,7 @@
"path": "queue-hook-test/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"DeployAssert": {
Expand All @@ -1081,7 +1071,7 @@
"path": "queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingsetDesiredCapacity/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
}
},
Expand Down Expand Up @@ -1145,7 +1135,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"AwsApiCallSQSreceiveMessage": {
Expand All @@ -1161,7 +1151,7 @@
"path": "queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
}
},
Expand Down Expand Up @@ -1201,7 +1191,7 @@
"path": "queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/IsCompleteProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"Invoke": {
Expand All @@ -1227,7 +1217,7 @@
"path": "queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/TimeoutProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"Invoke": {
Expand Down Expand Up @@ -1311,7 +1301,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": {
Expand Down Expand Up @@ -1345,7 +1335,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
},
"AwsApiCallAutoScalingcompleteLifecycleAction": {
Expand All @@ -1361,7 +1351,7 @@
"path": "queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingcompleteLifecycleAction/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.102"
"version": "10.1.140"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "20.0.0",
"version": "21.0.0",
"files": {
"516c8876cabc562bdf34136436fba1348731ecb81e67578b762095b7a048fc98": {
"62dd6f0ccfbbd1354c9a66f975cb337502f0359aa6f302762d33e013a53ee141": {
"source": {
"path": "aws-cdk-autoscaling-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "516c8876cabc562bdf34136436fba1348731ecb81e67578b762095b7a048fc98.json",
"objectKey": "62dd6f0ccfbbd1354c9a66f975cb337502f0359aa6f302762d33e013a53ee141.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,17 +422,7 @@
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ec2.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
"Service": "ec2.amazonaws.com"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"21.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "21.0.0",
"testCases": {
"integ.amazonlinux2": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "21.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
Expand All @@ -23,7 +23,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/516c8876cabc562bdf34136436fba1348731ecb81e67578b762095b7a048fc98.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/62dd6f0ccfbbd1354c9a66f975cb337502f0359aa6f302762d33e013a53ee141.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Loading