Terraform Cloud
Use the Terraform Cloud integration to reach the desired state of the configuration with automation.

Overview

Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. Terraform codifies cloud APIs into declarative configuration files.
This integration will help automate, manage and orchestrate your cloud infrastructure processes with the help of easy-to-create workflows.

Use Cases

The integration between Fylamynt and Terraform Cloud lets you:
    Plan a terraform module.
    Apply a Terraform plan created in a workspace.
    Discard a Terraform plan in a workspace if it has not been applied. Unlocks the workspace.
    Show the output in a Workspace.
    Modify Variables in a Workspace

Configure Terraform Cloud in Fylamynt

    Navigate to Settings > Integrations > Terraform
    Click on Add Integration
Details needed to set up Terraform Cloud instance in Fylamynt:
Parameter Name
Description
Required
Organization
The Terraform Cloud organization to be used for actions.
True
Token
A Terraform Cloud API token for a user in this Organization
True
Follow the steps listed below in your Terraform Cloud account and get the desired parameters to enter in Fylamynt.
    In a separate browser window or tab, Sign into Terraform Cloud
    Click on User Settings
    Click on Organizations
    Copy the organization name into the Organization text field in the Fylamynt UI.
    In the Terraform session, click on Tokens
    Click on Create an API token
    Add a Description
    Click on Create API token
    Copy the new token into the Token text field in the Fylamynt UI

Integration Actions

1. Terraform Apply

Apply a Terraform plan created in a workspace.

Input

Parameter Name
Description
Required
alias
Target account for running this action
True
run_id
Run id from a previous Terraform Plan
True

Output

Parameter Name
Type
Description
apply_result
String
Status of the Apply action
workspace_id
String
The workspace Id in which the action occurred

2. Terraform Discard

Discard a Terraform plan in a workspace if it has not been applied. Unlocks the workspace. Either run_id or workspace_id should be specified.

Input

Parameter Name
Description
Required
alias
Target account for running this action
True
run_id
Run id from a previous Terraform Plan run
False
workspace_id
Id of locked Workspace
False

Output

Parameter Name
Type
Description
run_id
String
The run id that was discarded. Can be None if the workspace was not locked.

3. Terraform Plan

Plan a terraform module. This action does not apply the plan automatically.

Input

Parameter Name
Description
Required
workspace_id
Id picked from the list of workspaces available to this organization
True

Output

Parameter Name
Type
Description
run_id
String
The run id for this action.
run_status
String
The status of the run when the action finishes
run_data
String
JSON object containing the data of the plan.

4. Terraform Show

Show the output in a Workspace.

Input

Parameter Name
Description
Required
workspace_id
Id picked from the list of workspaces available to this organization
True
alias
Target account for running this action
True
bucket
S3 bucket for storing the output
False

Output

Parameter Name
Type
Description
is_truncated
Boolean
True if the output in showhad to be truncated.
bucket
String
The name of the output bucket if provided in the inputs
key
String
The S3 key for the output if a bucket was provided in the inputs. This will have all the output.
show
String
The output (or the last 100 KB if truncated)

5. Terraform Update Vars

Modify Variables in a Workspace

Input

Parameter Name
Description
Required
workspace_id
Id picked from the list of workspaces available to this organization
True
variables
List of JSON dictionaries for variables set up for this workspace
True

Output

Parameter Name
Type
Description
variables
List of JSON dictionaries.
Variables updated by the user.

Action Example

Last modified 4mo ago