Sha256: 94c46d7de14f14b6536cfcfb96f33da5e74349123f9f3160ff70b2a7ff6ecf3a

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.1 lib/ruby_terraform/commands/remote_config.rb