File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/java/jp/classmethod/aws/gradle/cloudformation Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ public class AmazonCloudFormationMigrateStackTask extends ConventionTask {
66
66
@ Setter
67
67
private List <Tag > cfnStackTags = new ArrayList <>();
68
68
69
+ @ Getter
70
+ @ Setter
71
+ private String cfnRoleArn ;
72
+
69
73
@ Getter
70
74
@ Setter
71
75
private boolean capabilityIam ;
@@ -149,6 +153,7 @@ private void updateStack(AmazonCloudFormation cfn) throws IOException {
149
153
File cfnTemplateFile = getCfnTemplateFile ();
150
154
List <Parameter > cfnStackParams = getCfnStackParams ();
151
155
List <Tag > cfnStackTags = getCfnStackTags ();
156
+ String cfnRoleArn = getCfnRoleArn ();
152
157
String cfnStackPolicyUrl = getCfnStackPolicyUrl ();
153
158
File cfnStackPolicyFile = getCfnStackPolicyFile ();
154
159
@@ -165,7 +170,8 @@ private void updateStack(AmazonCloudFormation cfn) throws IOException {
165
170
UpdateStackRequest req = new UpdateStackRequest ()
166
171
.withStackName (stackName )
167
172
.withParameters (cfnStackParams )
168
- .withTags (cfnStackTags );
173
+ .withTags (cfnStackTags )
174
+ .withRoleARN (cfnRoleArn );
169
175
170
176
// If template URL is specified, then use it
171
177
if (Strings .isNullOrEmpty (cfnTemplateUrl ) == false ) {
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ private void applyTasks(Project project) { // NOPMD
96
96
.withKey (it .getKey ().toString ())
97
97
.withValue (it .getValue ().toString ()))
98
98
.collect (Collectors .toList ()));
99
+ task .conventionMapping ("cfnRoleArn" , () -> cfnExt .getCfnRoleArn ());
99
100
task .conventionMapping ("cfnTemplateUrl" , () -> cfnExt .getTemplateURL ());
100
101
task .conventionMapping ("cfnTemplateFile" , () -> cfnExt .getTemplateFile ());
101
102
task .conventionMapping ("cfnStackPolicyUrl" , () -> cfnExt .getStackPolicyURL ());
You can’t perform that action at this time.
0 commit comments