File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,26 @@ export const templateTags = [
22
22
type : "string" ,
23
23
defaultValue : "us-east-1" ,
24
24
} ,
25
+ {
26
+ displayName : "Profile" ,
27
+ description : "Name of the AWS CLI Profile to use" ,
28
+ type : "string" ,
29
+ } ,
25
30
] ,
26
- async run ( context , StackName , output , region ) : Promise < string > {
27
- const cf = new AWS . CloudFormation ( { region : region } ) ;
31
+ async run (
32
+ context ,
33
+ StackName : string ,
34
+ output : string ,
35
+ region : string ,
36
+ profile : string
37
+ ) : Promise < string > {
38
+ let credentials ;
39
+
40
+ if ( profile ) {
41
+ credentials = new AWS . SharedIniFileCredentials ( { profile } ) ;
42
+ }
43
+
44
+ const cf = new AWS . CloudFormation ( { region : region , credentials } ) ;
28
45
const stackDescriptions = await cf
29
46
. describeStacks ( {
30
47
StackName,
You can’t perform that action at this time.
0 commit comments