Sha256: 0d471ec99cdfd6edc0b5693f21e157732f0e28fd46f96de36c6a137d33937e68

Contents?: true

Size: 1.81 KB

Versions: 2

Compression:

Stored size: 1.81 KB

Contents

module RakeTerraform
  module Tasks
    class All < TaskLib
      parameter :configuration_name, :required => true
      parameter :configuration_directory, :required => true

      parameter :backend
      parameter :backend_config

      parameter :vars
      parameter :state_file

      parameter :no_color, :default => false
      parameter :no_backup, :default => false

      parameter :backup_file

      parameter :argument_names

      parameter :ensure_task, :default => :'terraform:ensure'

      parameter :provision_task_name, :default => :provision
      parameter :provision_argument_names

      parameter :destroy_task_name, :default => :destroy
      parameter :destroy_argument_names

      def define
        Provision.new do |t|
          t.name = provision_task_name
          t.argument_names = provision_argument_names || argument_names || []

          t.configuration_name = configuration_name
          t.configuration_directory = configuration_directory

          t.backend = backend
          t.backend_config = backend_config

          t.vars = vars
          t.state_file = state_file

          t.no_color = no_color
          t.no_backup = no_backup

          t.backup_file = backup_file

          t.ensure_task = ensure_task
        end
        Destroy.new do |t|
          t.name = destroy_task_name
          t.argument_names = destroy_argument_names || argument_names || []


          t.configuration_name = configuration_name
          t.configuration_directory = configuration_directory

          t.backend = backend
          t.backend_config = backend_config

          t.vars = vars
          t.state_file = state_file

          t.no_color = no_color
          t.no_backup = no_backup

          t.backup_file = backup_file

          t.ensure_task = ensure_task
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rake_terraform-0.7.0 lib/rake_terraform/tasks/all.rb
rake_terraform-0.6.0 lib/rake_terraform/tasks/all.rb