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.27.0.pre.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.27.0.pre.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.26.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.25.0.pre.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.24.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.23.0.pre.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.22.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.21.0.pre.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.21.0.pre.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.20.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.19.0.pre.pre.5 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.19.0.pre.pre.4 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.18.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.17.0.pre.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.16.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.15.1.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.15.1.pre2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.15.1.pre1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.15.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.14.1.pre1 lib/ruby_terraform/commands/remote_config.rb