aboutsummaryrefslogtreecommitdiff
path: root/lib/tasks/backend.rake
blob: c23a3dfab1f20808c9b787774694928b955cbd1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace :backend do
  namespace :terraform_libvirt do
    desc 'Deploy a Terraform libvirt backend'
    task :deploy, [:backend_id] => :environment do |t, args|
      Backends::TerraformLibvirt
        .find(args.backend_id)
        .deploy_backend
    end
  end

  namespace :terraform_aws do
    desc 'Deploy a Terraform AWS backend'
    task :deploy, [:backend_id] => :environment do |t, args|
      Backends::TerraformAws
        .find(args.backend_id)
        .deploy_backend
    end

    desc 'Destroy a Terraform AWS backend'
    task :destroy, [:backend_id] => :environment do |t, args|
      Backends::TerraformAws
        .find(args.backend_id)
        .destroy_backend
    end
  end
end