Initial commit
This commit is contained in:
16
lib/tasks/terraform.rake
Normal file
16
lib/tasks/terraform.rake
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace :terraform do
|
||||
desc 'Initialize the Terraform configuration'
|
||||
task :init do
|
||||
Dir.chdir('terraform') { sh 'terraform init' }
|
||||
end
|
||||
|
||||
desc 'Apply the Terraform configuration'
|
||||
task :apply => ['render:config', :init] do
|
||||
Dir.chdir('terraform') { sh 'terraform apply' }
|
||||
end
|
||||
|
||||
desc 'Destroy the Terraform infrastructure'
|
||||
task :destroy do
|
||||
Dir.chdir('terraform') { sh 'terraform destroy' }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user