Sha256: a1a529f7a9eacac838aeb725f32bc00c039489a9c489f14268196140e7cfe93f

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 KB

Contents

class Lono::CLI::Cfn
  class Opts < Lono::CLI::Opts
    def create
      base_options
      wait_options
    end

    def update
      base_options
      wait_options
    end

    def deploy
      update
    end

    def delete
      wait_options
    end

    def cancel
      wait_options
    end

    def preview
      base_options
      with_cli_scope do
        option :keep, type: :boolean, desc: "keep the changeset instead of deleting it afterwards"
      end
    end

    def download
      base_options
      with_cli_scope do
        option :name, desc: "Name you want to save the template as. Default: existing stack name."
        option :source, desc: "url or path to file with template"
      end
    end

    # Lono::Cfn and Lono::Sets
    def base_options(rollback: true)
      with_cli_scope do
        if rollback
          option :rollback, type: :boolean, desc: "rollback" # default: nil means CloudFormation default which is true
        end
        # common to Lono::Cfn and Lono::Sets
        option :capabilities, type: :array, desc: "iam capabilities. Ex: CAPABILITY_IAM, CAPABILITY_NAMED_IAM"
        option :iam, type: :boolean, desc: "Shortcut for common IAM capabilities: CAPABILITY_IAM, CAPABILITY_NAMED_IAM"
      end
    end

    def wait_options
      with_cli_scope do
        option :wait, type: :boolean, desc: "Wait for stack operation to complete.", default: true
        option :yes, aliases: :y, type: :boolean, desc: "Skip are you sure prompt" # moved to base but used by commands like `lono down` also. Just keep here.
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc6 lib/lono/cli/cfn/opts.rb
lono-8.0.0.pre.rc5 lib/lono/cli/cfn/opts.rb
lono-8.0.0.pre.rc4 lib/lono/cli/cfn/opts.rb
lono-8.0.0.pre.rc3 lib/lono/cli/cfn/opts.rb
lono-8.0.0.pre.rc2 lib/lono/cli/cfn/opts.rb
lono-8.0.0.pre.rc1 lib/lono/cli/cfn/opts.rb