From 77837f28aa621b282ec79ee34302b0c16d9722db Mon Sep 17 00:00:00 2001 From: Tom Gregory Date: Fri, 9 Oct 2020 10:11:33 +0100 Subject: [PATCH] Add role ARN to the CreateStackRequest in the migrate stack task. --- .../cloudformation/AmazonCloudFormationMigrateStackTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/jp/classmethod/aws/reboot/gradle/cloudformation/AmazonCloudFormationMigrateStackTask.java b/src/main/java/jp/classmethod/aws/reboot/gradle/cloudformation/AmazonCloudFormationMigrateStackTask.java index 0d0f454..78eb267 100644 --- a/src/main/java/jp/classmethod/aws/reboot/gradle/cloudformation/AmazonCloudFormationMigrateStackTask.java +++ b/src/main/java/jp/classmethod/aws/reboot/gradle/cloudformation/AmazonCloudFormationMigrateStackTask.java @@ -222,6 +222,7 @@ private void createStack(AmazonCloudFormation cfn) throws IOException { File cfnTemplateFile = getCfnTemplateFile(); List cfnStackParams = getCfnStackParams(); List cfnStackTags = getCfnStackTags(); + String cfnRoleArn = getCfnRoleArn(); String cfnStackPolicyUrl = getCfnStackPolicyUrl(); File cfnStackPolicyFile = getCfnStackPolicyFile(); String cfnOnFailure = getCfnOnFailure(); @@ -240,7 +241,8 @@ private void createStack(AmazonCloudFormation cfn) throws IOException { .withStackName(stackName) .withParameters(cfnStackParams) .withTags(cfnStackTags) - .withOnFailure(cfnOnFailure); + .withOnFailure(cfnOnFailure) + .withRoleARN(cfnRoleArn); // If template URL is specified, then use it if (Strings.isNullOrEmpty(cfnTemplateUrl) == false) {