Class: Ansible::Ruby::Modules::Terraform
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Terraform
- Defined in:
- lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb
Overview
Provides support for deploying resources with Terraform and pulling resource information back into Ansible.
Instance Method Summary collapse
-
#backend_config ⇒ Hash?
A group of key-values to provide at init stage to the -backend-config parameter.
-
#binary_path ⇒ Object?
The path of a terraform binary to use, relative to the ‘service_path’ unless you supply an absolute path.
-
#force_init ⇒ Symbol?
To avoid duplicating infra, if a state file can’t be found this will force a ‘terraform init`.
-
#lock ⇒ Object?
Enable statefile locking, if you use a service that accepts locks (such as S3+DynamoDB) to store your statefile.
-
#lock_timeout ⇒ Object?
How long to maintain the lock on the statefile, if you use a service that accepts locks (such as S3+DynamoDB).
-
#plan_file ⇒ Object?
The path to an existing Terraform plan file to apply.
-
#project_path ⇒ String
The path to the root of the Terraform directory with the vars.tf/main.tf/etc to use.
-
#purge_workspace ⇒ Symbol?
Only works with state = absent,If true, the workspace will be deleted after the “terraform destroy” action.,The ‘default’ workspace will not be deleted.
-
#state ⇒ :planned, ...
Goal state of given stage/project.
-
#state_file ⇒ Object?
The path to an existing Terraform state file to use when building plan.
-
#targets ⇒ Object?
A list of specific resources to target in this plan/application.
-
#variables ⇒ Object?
A group of key-values to override template variables or those in variables files.
-
#variables_file ⇒ Object?
The path to a variables file for Terraform to fill into the TF configurations.
-
#workspace ⇒ String?
The terraform workspace to work with.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#backend_config ⇒ Hash?
Returns A group of key-values to provide at init stage to the -backend-config parameter.
56 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 56 attribute :backend_config |
#binary_path ⇒ Object?
Returns The path of a terraform binary to use, relative to the ‘service_path’ unless you supply an absolute path.
16 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 16 attribute :binary_path |
#force_init ⇒ Symbol?
Returns To avoid duplicating infra, if a state file can’t be found this will force a ‘terraform init`. Generally, this should be turned off unless you intend to provision an entirely new Terraform deployment.
52 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 52 attribute :force_init |
#lock ⇒ Object?
Returns Enable statefile locking, if you use a service that accepts locks (such as S3+DynamoDB) to store your statefile.
46 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 46 attribute :lock |
#lock_timeout ⇒ Object?
Returns How long to maintain the lock on the statefile, if you use a service that accepts locks (such as S3+DynamoDB).
49 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 49 attribute :lock_timeout |
#plan_file ⇒ Object?
Returns The path to an existing Terraform plan file to apply. If this is not specified, Ansible will build a new TF plan and execute it. Note that this option is required if ‘state’ has the ‘planned’ value.
31 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 31 attribute :plan_file |
#project_path ⇒ String
Returns The path to the root of the Terraform directory with the vars.tf/main.tf/etc to use.
19 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 19 attribute :project_path |
#purge_workspace ⇒ Symbol?
Returns Only works with state = absent,If true, the workspace will be deleted after the “terraform destroy” action.,The ‘default’ workspace will not be deleted.
27 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 27 attribute :purge_workspace |
#state ⇒ :planned, ...
Returns Goal state of given stage/project.
12 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 12 attribute :state |
#state_file ⇒ Object?
Returns The path to an existing Terraform state file to use when building plan. If this is not specified, the default terraform.tfstate will be used.,This option is ignored when plan is specified.
34 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 34 attribute :state_file |
#targets ⇒ Object?
Returns A list of specific resources to target in this plan/application. The resources selected here will also auto-include any dependencies.
43 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 43 attribute :targets |
#variables ⇒ Object?
Returns A group of key-values to override template variables or those in variables files.
40 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 40 attribute :variables |
#variables_file ⇒ Object?
Returns The path to a variables file for Terraform to fill into the TF configurations.
37 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 37 attribute :variables_file |
#workspace ⇒ String?
Returns The terraform workspace to work with.
23 |
# File 'lib/ansible/ruby/modules/generated/cloud/misc/terraform.rb', line 23 attribute :workspace |