Sha256: f0dec6e317fb15cde39da443f6dace02a59c003da2d7b52948dffcb9a45effe1

Contents?: true

Size: 728 Bytes

Versions: 49

Compression:

Stored size: 728 Bytes

Contents

require 'lino'
require_relative 'base'

module RubyTerraform
  module Commands
    class RemoteConfig < Base
      def configure_command(builder, opts)
        backend = opts[:backend]
        no_color = opts[:no_color]
        backend_config = opts[:backend_config] || {}

        builder
            .with_subcommand('remote')
            .with_subcommand('config') do |sub|
              sub = sub.with_option('-backend', backend) if backend
              backend_config.each do |key, value|
                sub = sub.with_option('-backend-config', "'#{key}=#{value}'", separator: ' ')
              end

              sub = sub.with_flag('-no-color') if no_color
              sub
            end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
ruby-terraform-0.13.2.pre42 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre41 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre40 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.14.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre39 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre38 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre37 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre36 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre35 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre34 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre33 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre32 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.2.pre31 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.13.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.12.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.12.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.11.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.11.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.10.0 lib/ruby_terraform/commands/remote_config.rb