Terraform CLI
Use the integration to execute Terraform templates and connect the execution with other integrations that Fylamynt offers.
Last updated
Use the integration to execute Terraform templates and connect the execution with other integrations that Fylamynt offers.
Last updated
This document describes the Terraform CLI integration, not to be confused with our support for the Terraform Cloud integration.
SREs run multiple types of code (e.g. Terraform templates, Ansible playbooks, Python scripts) to automate their tasks. Currently, ad-hoc mechanisms to manage secrets, pass data, collect logs, and manage users are being developed. We built this integration, specifically to support the execution of Terraform templates.
Details needed to set up Terraform CLI instance in Fylamynt:
The module code is expected to be in a GitHub or S3 Bucket Resource.
Navigate to Settings > Resources > Terraform Modules
Parameter Name | Description | Required |
Module Name | Reference name for the module. This will be used by action nodes. | True |
Target Account | The target account against which Terraform CLI actions will be run | True |
Root | The base of the terraform module tree, defaults to the root directory | False |
Click on Manage Modules
Click on Add New
Enter a Module Name for reference. This will be used by Terraform CLI action nodes.
Select Target Account against which Terraform CLI actions will be executed.
Select Input source type, either a Git Repo or S3 bucket
Select the actual module from the list
All Terraform CLI Actions run asynchronously, and the results are stored in log_bucket under log_key once they finish. All actions are configured the same way:
Terraform_CLI_Plan - runs terraform plan on the specified module.
Terraform_CLI_Apply - runs terraform apply on the specified module, does not wait for confirmation.
Terraform_CLI_Show - runs terraform show on the specified module.
Terraform_CLI_Destroy - runs terraform destroy on the specified module, does not wait for confirmation.
Input
Parameter Name | Description | Required |
alias | Target account alias for executing Terraform CLI action | True |
module | Terraform module configured as Resource | True |
log_bucket | S3 bucket for log files | True |
extra_args | Extra arguments to terraform executable | False |
version | terraform version to use, defaults to 0.13 | False |
workspace | Terraform workspace to use | False |
Output
Parameter Name | Type | Description |
log_bucket | String | S3 bucket for log files |
log_key | String | S3 log file created by action |
task_arn | String | ARN of asynchronous action |
task_status | String | Status of Terraform task when action finished |
execution_status | String | Status of action when it exited. |