Sha256: 0f914164b5bbdeeec821f07b29cd461e0c8a822140edc4bdff15f336fba13300

Contents?: true

Size: 749 Bytes

Versions: 48

Compression:

Stored size: 749 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

48 entries across 48 versions & 1 rubygems

Version Path
ruby-terraform-0.64.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.63.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.62.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.61.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.60.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.59.0.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.59.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.58.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.57.0.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.57.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.56.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.55.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.54.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.53.0.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.53.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.52.0 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.51.0.pre.3 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.51.0.pre.2 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.51.0.pre.1 lib/ruby_terraform/commands/remote_config.rb
ruby-terraform-0.50.0 lib/ruby_terraform/commands/remote_config.rb