mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Update Terraform commands for v0.10 (#93)
* Terraform now requires init to fetch providers Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com> * Rename env terraform command to workspace Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com> * Pin Terraform version to reflect CLI updates Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
9bbb439467
commit
2f9317265b
2 changed files with 8 additions and 3 deletions
7
Rakefile
7
Rakefile
|
@ -42,7 +42,8 @@ namespace :test do
|
|||
|
||||
task :configure_test_environment, :namespace do |t, args|
|
||||
puts "----> Creating terraform environment"
|
||||
sh("cd #{integration_dir}/build/ && terraform env new #{args[:namespace]}")
|
||||
sh("cd #{integration_dir}/build/ && terraform init")
|
||||
sh("cd #{integration_dir}/build/ && terraform workspace new #{args[:namespace]}")
|
||||
end
|
||||
|
||||
task :setup_integration_tests do
|
||||
|
@ -69,8 +70,8 @@ namespace :test do
|
|||
|
||||
task :destroy_test_environment, :namespace do |t, args|
|
||||
puts "----> Destroying terraform environment"
|
||||
sh("cd #{integration_dir}/build/ && terraform env select default")
|
||||
sh("cd #{integration_dir}/build && terraform env delete #{args[:namespace]}")
|
||||
sh("cd #{integration_dir}/build/ && terraform workspace select default")
|
||||
sh("cd #{integration_dir}/build && terraform workspace delete #{args[:namespace]}")
|
||||
end
|
||||
|
||||
task :integration do
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
terraform {
|
||||
required_version = "~> 0.10.0"
|
||||
}
|
||||
|
||||
provider "aws" {}
|
||||
|
||||
resource "aws_instance" "example" {
|
||||
|
|
Loading…
Reference in a new issue