Initial set up for Terraform Cloud

Install terraform

https://learn.hashicorp.com/tutorials/terraform/install-cli

Install this vscode extension.

Open a terraform cloud account. Create a workspace with a VCS workflow.
Set up a simple script to launch an EC2 instance.

https://…


This content originally appeared on DEV Community and was authored by leroykayanda

  • Install terraform

https://learn.hashicorp.com/tutorials/terraform/install-cli

  • Install this vscode extension.

Image description

  • Open a terraform cloud account. Create a workspace with a VCS workflow.

  • Set up a simple script to launch an EC2 instance.

https://github.com/hashicorp/tfc-guide-example

  • Use this in the terraform block.
terraform {

  backend "remote" {
    hostname     = "app.terraform.io"
    organization = "org-name"

    workspaces {
      name = "workspace_name"
    }
  }

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 4.4.0"
    }
  }
}
  • Log in to terraform cloud terraform login

  • Run terraform init

  • Commit to your repo to trigger an apply


This content originally appeared on DEV Community and was authored by leroykayanda


Print Share Comment Cite Upload Translate Updates
APA

leroykayanda | Sciencx (2022-04-13T07:01:39+00:00) Initial set up for Terraform Cloud. Retrieved from https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/

MLA
" » Initial set up for Terraform Cloud." leroykayanda | Sciencx - Wednesday April 13, 2022, https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/
HARVARD
leroykayanda | Sciencx Wednesday April 13, 2022 » Initial set up for Terraform Cloud., viewed ,<https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/>
VANCOUVER
leroykayanda | Sciencx - » Initial set up for Terraform Cloud. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/
CHICAGO
" » Initial set up for Terraform Cloud." leroykayanda | Sciencx - Accessed . https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/
IEEE
" » Initial set up for Terraform Cloud." leroykayanda | Sciencx [Online]. Available: https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/. [Accessed: ]
rf:citation
» Initial set up for Terraform Cloud | leroykayanda | Sciencx | https://www.scien.cx/2022/04/13/initial-set-up-for-terraform-cloud/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.