User Tools

Site Tools


burim:terraform

count vs for_each

https://spacelift.io/blog/terraform-count-for-each

Exploring Ephemerality in Terraform 1.10 and Beyond

https://developer.hashicorp.com/terraform/intro/terraform-editions

enviroments

New in terraform

New ways to simplify HashiCorp Terraform workflows with AI-powered insights from Anthropic.

1️⃣ Automate commands to ensure your Terraform configurations are reliable before deploying.

2️⃣ For HCP #Terraform customers, the Plan Analyzer helps you review plan files, even when working with public modules or unfamiliar code.

Make your infrastructure more efficient and secure. Start exploring these tools today: https://bit.ly/4iyitAn

terraform 1.10

Data types

hardcoded values

Github actions

Terraform env

Terraform repo setup

Matt from microsoft videos

Data types

terraform move to module

terraform state rm

trainings learning

data

Using GithubActions to retrive credentials

on:
  push:
    branches:
      - main

jobs:
  terraform:
    runs-on: ubuntu-latest
    env:
      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Terraform Init
      run: terraform init
    - name: Terraform Plan
      run: terraform plan
    - name: Terraform Apply
      run: terraform apply
    

Data types

Terraform supports several data types that can be used in configuration files and expressions. Here are some of the most common data types in Terraform:

String: A sequence of characters. Strings are enclosed in double quotes (“) or single quotes (') in Terraform configuration files. Examples: “hello world”, 'my string'.

Number: A numeric value. Numbers can be integers or floating-point values. Examples: 42, 3.14159.

Boolean: A value that represents true or false. Boolean values are represented by the keywords true and false in Terraform configuration files.

List: A collection of items of any data type. Lists are defined using the list function and enclosed in square brackets []. Examples: [1, 2, 3], [“item1”, “item2”].

Map: A collection of key-value pairs of any data type. Maps are defined using the map function and enclosed in curly braces {}. Examples: { “name” = “John”, “age” = 30 }, { “key1” = “value1”, “key2” = “value2” }

Tuple: A collection of fixed number of items of different data types. Tuples are defined with parentheses () and comma separated values. Examples: (“firstname”, “lastname”), (1, “string”)

Set: A collection of unique items of any data type. Sets are defined using the set function and enclosed in curly braces {}.

Object: Terraform does not have a specific object type, but you can use a map to represent an object, where the keys are the object's properties and the values are the property's values.

Null: A special value that represents the absence of a value. It can be used to indicate that a variable or an output has no value.

Any: Terraform also has an “any” type, which can be used to represent any type of value. This is useful when you want to pass a value to a function or a resource that can accept multiple types of input.

Terraform also has a number of built-in functions that can be used to manipulate and process data, such as length, lookup, concat, flatten, zipmap, setproduct, distinct, sort, reverse, slice, chunklist among others. These functions allow you to perform operations on data, such as counting the number of items in a list, looking up a specific item in a list, or joining two lists together.

Condition

Bank TF

for_each

Labs Play

Cisco

Youtube terraform videos

Terraform enterprise

GCP terraform

Docs

Terraform vs Ansible

Ansible vs. Terraform

Terraform is declarative.

Ansible is a mix of declarative and procedural, depending on the modules.

running terraform

terraform init
terraform plan  
terraform apply

terraform sample

vpc service controls

glb demo

Github actions runner in GCP

burim/terraform.txt · Last modified: 2025/08/25 08:27 by burim

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki