Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/khuedoan/terraform-cloud

Manage Terraform Cloud using Terraform
https://github.com/khuedoan/terraform-cloud

saas terraform

Last synced: 13 days ago
JSON representation

Manage Terraform Cloud using Terraform

Awesome Lists containing this project

README

        

# Terraform Cloud

Manage Terraform Cloud using Terraform

## Prerequisites

- Create a Terraform Cloud account at
- Create an Organization (I named mine `khuedoan`)
- Create an API token at
- Create a Workspace named `terraform-cloud`
- Create an environment variable for the token:
- Key: `TFE_TOKEN`
- Value: `mysupersecret.token.abcdefghijklmnop` (from the previous step)
- Sensitive: `true`
- Description: `Terraform Cloud API token`

## Import current workspaces (if any)

```sh
terraform init
terraform import tfe_workspace.$NAME $ID
```

## Apply changes

```sh
terraform init
terraform apply
```

## Setup GitHub Actions

- Create another Terraform Cloud API token named `github-actions`
- Go to GitHub project Settings -> Secrets -> New repository secret:
- Name: `TF_API_TOKEN`
- Value: `mysupersecret.token.abcdefghijklmnop` (from the previous step)