11package stackset
22
33import (
4+ "github.com/aws-cloudformation/rain/internal/aws/s3"
45 "github.com/aws-cloudformation/rain/internal/config"
56 "github.com/aws-cloudformation/rain/internal/console"
67 "github.com/spf13/cobra"
@@ -33,11 +34,16 @@ Use "{{.CommandPath}} [command] --help" for more information about a command.{{e
3334var delegatedAdmin bool
3435
3536// addCommand adds a command to the root command.
36- func addCommand (profileOptions bool , c * cobra.Command ) {
37+ func addCommand (profileOptions bool , bucketOptions bool , c * cobra.Command ) {
3738 if profileOptions {
3839 c .Flags ().StringVarP (& config .Profile , "profile" , "p" , "" , "AWS profile name; read from the AWS CLI configuration file" )
3940 c .Flags ().StringVarP (& config .Region , "region" , "r" , "" , "AWS region to use" )
4041 }
42+ if bucketOptions {
43+ c .Flags ().StringVar (& s3 .BucketName , "s3-bucket" , "" , "Name of the S3 bucket that is used to upload assets" )
44+ c .Flags ().StringVar (& s3 .BucketKeyPrefix , "s3-prefix" , "" , "Prefix to add to objects uploaded to S3 bucket" )
45+ c .Flags ().StringVar (& s3 .ExpectedBucketOwner , "s3-owner" , "" , "The account where S3 assets are stored" )
46+ }
4147
4248 c .Flags ().BoolVar (& delegatedAdmin , "admin" , false , "Use delegated admin permissions" )
4349
@@ -51,9 +57,9 @@ var StackSetCmd = &cobra.Command{
5157}
5258
5359func init () {
54- addCommand (true , LsCmd )
55- addCommand (true , DeployCmd )
56- addCommand (true , RmCmd )
60+ addCommand (true , false , LsCmd )
61+ addCommand (true , true , DeployCmd )
62+ addCommand (true , false , RmCmd )
5763
5864 oldUsageFunc := StackSetCmd .UsageFunc ()
5965 StackSetCmd .SetUsageFunc (func (c * cobra.Command ) error {
0 commit comments