Terraweek challenge: Day 2 Task

Terraweek challenge: Day 2 Task

TerraWeek Day 2

Task 1: Familiarize yourself with HCL syntax used in Terraform

  • Learn about HCL blocks, parameters, and arguments

    In the below image block is resource, parameter is "docker_image"(resources type) "nginx-img-rsc" (resource name), argument is lines written in {ame = "nginx:latest" keep_locally = false}

image

  • Explore the different types of resources and data sources available in Terraform

    resource docker container

    image

    resource local file

    image

Task 2: Understand variables, data types, and expressions in HCL

image

  • Use the variable in a main.tf file to create a "local_file" resource

    vim main.tf

image

Task 3: Practice writing Terraform configurations using HCL syntax

  • Add required_providers to your configuration, such as Docker or AWS

    vim terraform.tf

    image

  • Test your configuration using the Terraform CLI and make any necessary adjustments

image

--

image

--

image

Attach code snippets and steps wherever necessary and post your learnings on LinkedIn Feel Free to reach out to any of the TWS Community Builders / Leaders Watch this 👉 https://youtu.be/kqJIKjkJ1Lo

Happy Learning🎉🚀