3.1 - Terraform Code

Goal: Create a Terraform provider / resource / variable

Steps

  1. Select main.tf in the file tree and add the following Terraform code: provider "aws" { region = var.aws_region }

  2. Click SAVE

  3. Select variables.tf in the file tree and the following Terraform code: variable "aws_region" { }

  4. Click + ADD and select Terraform File and set File Path to ecr.tf

  5. Add the following Terraform code: resource "aws_ecr_repository" "tutorial" { name = "tutorial" }

  6. Click ADD (or SAVE)

  7. Click on FORM on the top-right corner to use the resource builder

  8. Click on DOCS on the top-right corner to see the Terraform documentation for this resource

Last updated