Skip to content

Commit

Permalink
Reuse stack Capabilities and NotificationARNs
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom committed Nov 23, 2024
1 parent 8cfc927 commit d416676
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func run(ctx context.Context, args runArgs) error {
if l := len(desc.Stacks); l != 1 {
return fmt.Errorf("DescribeStacks returned %d stacks, expected 1", l)
}

stack := desc.Stacks[0]
var params []types.Parameter
var seenKey bool
for _, p := range desc.Stacks[0].Parameters {
for _, p := range stack.Parameters {
k := aws.ToString(p.ParameterKey)
if k == args.key && aws.ToString(p.ParameterValue) == args.value {
return errAlreadySet
Expand All @@ -89,6 +89,8 @@ func run(ctx context.Context, args runArgs) error {
ClientRequestToken: &token,
UsePreviousTemplate: aws.Bool(true),
Parameters: params,
Capabilities: stack.Capabilities,
NotificationARNs: stack.NotificationARNs,
})
if err != nil {
return err
Expand Down

0 comments on commit d416676

Please sign in to comment.