Category "terraform"

Monitoring GCP Projects with Terraform

I have a "Monitor" project in Google Cloud and want it to monitor the metrics of several other projects. On the Cloud Console, I can easily add these projects t

The Terraform CLI get a Error: ID was missing the `slots` element

I am executing terraform.exe apply on windows and receive the error: azurerm_subnet.subnet: Refreshing state... [id=<...>] azurerm_app_service_plan.servic

Create multiple rules in AWS security Group

I tried to create an AWS security group with multiple inbound rules, Normally we need to multiple ingresses in the sg for multiple inbound rules. Instead of cre

How AWS Credentials works at GitHub Actions With MFA

Not able to create s3 bucket from terraform code to create s3 bucket. I have code uses: hashicorp/terraform-github-actions/[email protected] env: TF_AC

How to print terraform variable values?

I am learning terraform. I want to print values of variables in "plan" stage. So I found how to do it. seems I am doing something wrong here.... in variables.tf

Linking a series of GCP disks to corresponding instances dynamically in terraform

I need to dynamically create a variable number of riak instances, each with an attached disk across multiple zones in GCP using terraform. Each attached disk mu

is it possible to read values from a tfvars file in Jenkins?

I have some terraform code that uses a map of tfvars to deploy multiple lambdas to Aws. it all works fine except I want to run the script in a Jenkins pipeline

Terraform enable VM Insights

Did someone managed to enable via terraforms Insights for a VM? i'm able to create a VM, enable logging, but not enable insights.. i've seen this question: but

Using terraform, unable to add SSM document to aws_cloudwatch_event_target

I'm very new to Terraform and am trying use it to replicate what I've successfully created via the AWS console. I'm trying to specify a "SSM Run Command" as a

Create multiple scalable role_assignments in Terraform

i have been tasked to write the below code with minimal lines, rather having 3 resource blocks can this be done in a single block using for_each function. It sh

Cannot override provider configuration error in installing DC/OS via Terraform on azure

Working on setting up DC/OS on Microsoft Azure using Terraform. I'm using the main.tf provided in the official documentation. Every time I run terraform init I

How to access variables in a list / object in Terraform?

In Terraform, how can access the values from the variable below? variable "egress_rules" { type = list(object({ from_port = number to_port = number

How to load file not using hashicorp/template in terraform

Apple M1 chip doesn't support hashicorp/template and which result in the below error ╷ │ Error: Incompatible provider version │ │ Provi

How do you create an archive file in Terraform?

I have this code in terraform: data "archive_file" "lambdazip" { type = "zip" output_path = "lambda_launcher.zip" source_dir = "lambda/etc" sou

How do you create an archive file in Terraform?

I have this code in terraform: data "archive_file" "lambdazip" { type = "zip" output_path = "lambda_launcher.zip" source_dir = "lambda/etc" sou

How to create or import an Azure API Connection (Microsoft.Web) using Terraform?

My requirement is to create a Logic App that will receive some inputs from other resources like Azure Data Factory and send out an email. I created this setup u

PG bouncer running on vm instance stops connecting to cloud sql

The issue: I'm not sure how to begin problem solving this or where to look for errors. Setup: Running a node.js backend via GCR and it's hitting a postgres db o

How can I use locals defined in terragrunt.hcl in Terraform files?

I've created this folder structure: . ├── main.tf └── terragrunt.hcl # FILE: terragrunt.hcl include { path = find_in_par

terraform data archive file source directory with selected files and directories

I want to create a data archive_file with selected files and folders as source_dir. I have the folder structure as below. Within the src directory, I have lambd

AWS Terraform tried to destroy and rebuild RDS cluster

I have an RDS cluster I built using Terraform, this is running deletion protection currently. When I update my Terraform script for something (example security