plugins: tf: executor: central_deployment_agent package_name: cloudify-terraform-plugin package_version: '0.17.3' dsl_definitions: terraform_config: &terraform_config terraform_config: type: cloudify.types.terraform.DirectoryConfig description: Terraform directories for executions. required: false data_types: cloudify.types.terraform.DirectoryConfig: properties: executable_path: type: string description: The path to the terraform binary executable. required: false storage_path: type: string description: > Directory to store downloaded Terraform templates. The directory must either already exist and be writable by 'cfyuser', or alternatively be create-able by 'cfyuser'. The default is an empty string, which prompts the plugin to use the OS temporary directory. Update 0.13.5: DEPRECATED. required: false plugins_dir: type: string description: > Location where Terraform plugins are located. If a value is provided, then the Terraform plugin uses '--plugin-dir' with that value, ensuring that no plugins are downloaded on-the-fly, for increased stability. If a value is not provided, plugins will be downloaded on-the-fly. This is not recommended in production environments. Update 0.13.5: DEPRECATED. required: false cloudify.types.terraform.InstallConfig: properties: use_existing_resource: type: boolean description: If true, use an existing Terraform installation rather than installing it default: false installation_source: type: string default: 'https://releases.hashicorp.com/terraform/0.13.3/terraform_0.13.3_linux_amd64.zip' description: Location to download the Terraform executable binary from. Ignored if 'use_existing' is true. plugins: # type: list commented for 4.X support default: {} description: List of plugins to download and install. cloudify.types.terraform.Backend: properties: name: type: string description: Some name. required: False options: description: Should be a dictionary of key/values. required: False cloudify.types.terraform.SourceSpecification: properties: location: type: string description: > Path or URL to the ZIP file containing the Terraform project. If this is a path, then it must be relative to the blueprint's root. required: true username: type: string description: > Username to authenticate with required: false password: type: string description: > Password to authenticate with required: false cloudify.types.terraform.RootModule: properties: source: type: cloudify.types.terraform.SourceSpecification description: > Specification of Terraform module's source. required: true source_path: type: string description: The path within the source property, where the terraform files may be found. default: '' backend: type: cloudify.types.terraform.Backend description: > If a backend is not defined in source, and you want to use a specific backend, define that here. default: {} variables: description: A dictionary of variables. required: false default: {} environment_variables: description: A dictionary of environment variables. required: false default: {} node_types: # Represents a Terraform installation. cloudify.nodes.terraform: derived_from: cloudify.nodes.SoftwareComponent properties: <<: *terraform_config resource_config: type: cloudify.types.terraform.InstallConfig required: true interfaces: cloudify.interfaces.lifecycle: create: implementation: tf.cloudify_tf.tasks.install delete: implementation: tf.cloudify_tf.tasks.uninstall # Represents a Terraform module. cloudify.nodes.terraform.Module: derived_from: cloudify.nodes.ApplicationModule properties: resource_config: type: cloudify.types.terraform.RootModule required: true max_stored_filesize: type: integer description: The maximum file size that you want us to store in the rest service. Protect your manager. default: 50000 store_plugins_dir: type: boolean description: Whether to store terraform binary plugins. Protect your manager. default: false provider_upgrade: type: boolean description: Whether to add "--upgrade" to init command. default: false interfaces: cloudify.interfaces.lifecycle: configure: implementation: tf.cloudify_tf.tasks.apply start: implementation: tf.cloudify_tf.tasks.state_pull delete: implementation: tf.cloudify_tf.tasks.destroy pull: implementation: tf.cloudify_tf.tasks.state_pull terraform: plan: implementation: tf.cloudify_tf.tasks.plan inputs: source: default: { get_property: [SELF, resource_config, source ] } source_path: default: { get_property: [SELF, resource_config, source_path ] } reload: # Reloads the Terraform template. By default, the template will be # read from the last location it was loaded from. # This can be overridden by specifying the 'source' input. implementation: tf.cloudify_tf.tasks.reload_template inputs: source: description: > URL or path to a ZIP/tar.gz file or a Git repository to obtain new module source from. If omitted, then the module is reloaded from its last location. type: string default: { get_attribute: [ SELF, last_source_location ] } source_path: type: string description: The path within the source property, where the terraform files may be found. default: { get_property: [ SELF, resource_config, source_path ] } destroy_previous: description: > If true, then the plugin destroys the existing Terraform topology before applying the new one. type: boolean default: false refresh: # Refreshes Terraform's state. implementation: tf.cloudify_tf.tasks.state_pull relationships: cloudify.terraform.relationships.run_on_host: derived_from: cloudify.relationships.connected_to source_interfaces: cloudify.interfaces.relationship_lifecycle: preconfigure: implementation: tf.cloudify_tf.tasks.set_directory_config workflows: refresh_terraform_resources: mapping: tf.cloudify_tf.workflows.refresh_resources parameters: &terraform_workflow_params node_instance_ids: # type: list commented for 4.X support default: [] description: | List of node instance ID's to refresh for. node_ids: # type: list commented for 4.X support default: [] description: | List of node templates to refresh for. terraform_plan: mapping: tf.cloudify_tf.workflows.terraform_plan parameters: &terraform_plan_params <<: *terraform_workflow_params source: type: string default: '' source_path: type: string default: '' reload_terraform_template: mapping: tf.cloudify_tf.workflows.reload_resources parameters: &terraform_reload_params <<: *terraform_plan_params destroy_previous: type: boolean default: false