action-integration-terraform

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 4 Imported by: 0

README

Action Integration Terraform Cloud

Sets up Terraform API in your GitHub Actions workflow.

Cases

This project arose in the need to create dynamic environment with Terraform Cloud interaction.

  1. We had a problem when creating an environment variable in the Terraform Cloud workspace that would be used to define STAGE in the AWS API Gateway depending on the branch used. example: main: stage -> prod and develop: stage dev
Variables

Go CI test integration

Usage

The Mona-bele/action-integration-terraform action is used to set up Terraform API in your GitHub Actions workflow.

Example workflow
name: Terraform API
on:
  push:
    branches:
      - main
        
jobs:
  terraform-apply:
    name: 'Terraform'
    runs-on: ubuntu-latest
    environment: production
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      
      - name: Terraform API Integration Create Variable
        uses: Mona-bele/action-integration-terraform@v1
        with:
          tf_api_token: ${{ secrets.TF_API_TOKEN }}
          tf_workspace: ${{ env.workspace }}
          tf_organization: ${{ env.organization }}
          tf_run_type: 'variable_create'
          tf_variable_key: 'test'
          tf_variable_value: 'test'
          tf_variable_category: 'terraform'
          tf_variable_sensitive: 'false'
          tf_variable_hcl: 'false'
          tf_variable_description: 'test'
          
      - name: Terraform API Integration Delete Variable
        uses: Mona-bele/action-integration-terraform@v1
        with:
          tf_api_token: ${{ secrets.TF_API_TOKEN }}
          tf_workspace: ${{ env.workspace }}
          tf_organization: ${{ env.organization }}
          tf_run_type: 'variable_delete'
          tf_variable_key: 'test'
      
      

License

action-integration-terraform is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
run

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL