Category "terraform"

How to connect to instance using terraform aws_instance resource

I created an aws_instance resource without any issue, but, I want to know how can I enable the SessionManager, the EC2 Instance Connect and EC2 Serial Console u

Generation of a set to be used in for_each

Is there a way to generate a set from an Integer? It would convenient if we have a number_of_instances parameter that is converted to set to be used in for_each

How to get Google Cloud Build working inside VPC Perimeter?

I have a question that is confusing me a little. I have a project locked down at the org level through a perimeter fence. This is to whitelist ip ranges to acce

AWS - Find event source mapping UUID

I need to import an event source mapping using Terraform and the documentation says: terraform import aws_lambda_event_source_mapping.event_source_mapping

error updating CloudFront Distribution (E32RNPFGEUHQ6J): InvalidWebACLId: Web ACL is not accessible by the requester

I am using terraform to create a web-acl in aws and want to associate that web-acl with CloudFront distribution. So, here's how my code looks like: provider "aw

Terraform azure provider gave me "features required field not set"

This code gave me error, even with the feature block. terraform { required_version = ">= 0.12" required_providers { azurerm = { source = "has

Azure AzApi provider in Terraform

I'm trying to use Azure AzApi provider to update the Azure key vault key rotation policy. Both "Azure AzApi provider" and Key Rotation Policy are very new featu

Terraform aws_wafv2_ip_set delete ip on apply

I have a resource aws_wafv2_ip_set that is used by many different modules. variable "addresses" { type = set(string) default = [] } resource "aws_wafv2_

Terraform aws_wafv2_ip_set delete ip on apply

I have a resource aws_wafv2_ip_set that is used by many different modules. variable "addresses" { type = set(string) default = [] } resource "aws_wafv2_

Create AWS Lambda function using Terraform

I faced with a problem concerning of creation of Lambda function using Terraform. I tried to follow a standard documentation of Terraform to configure it, but i

How to validate a character set in terraform variable?

i need to validate a variable in terraform. The content of the variable should be only 0-9, a-z and A-Z. Im tried it with following code: variable "application_

Script to create swap partition fails when running automatically

I am creating a cluster of machines in AWS (Amazon Linux 2) using terraform by utilizing the user_data argument under the aws_instance resource. Part of the scr

Terraform optional provider for optional resource

I have a module where I want to conditionally create an s3 bucket in another region. I tried something like this: resource "aws_s3_bucket" "backup" { count

How to avoid ClusterIssuer dependency on helm cert-manager CRDs in Terraform plan and apply? ("ClusterIssuer" not found in group "cert-manager.io")

I am trying to create a module in Terraform to create the basic resources in a Kubernetes cluster, this means a cert-manager, ingress-nginx (as the ingress cont

When using Terraform with AWS, how can I set a rate limit on a specific URI path (or regex of a URI path) on an ALB

I am trying to rate limit requests to the forgot password change URL using WAFv2 rules attached to an ALB on Cloudfront. What I think I need to do is.. Create t

What permission is required to remove or add resource lock for Azure SQL with Terraform on Azure Pipeline

I have prod subscription where deploying pipeline fails because of permission missing. My Azure AD user have no permission to create or remove locks of Azure SQ

terraform azurerm - cannot destroy public ip

New to terraform so i'm hoping this is an easy issue. I'm creating some resources in azure and deploying a simple flask application to AKS. Creating works fine

How to delete the AMI and snapshot simultaneously during terraform destroy?

In my case, AWS AMI was created by packer and deleting the image via terraform (0.11.6 version) using terraform import and terraform destroy. Once after importi

Shall I use d.Set() for a computer attribute?

I'm adding a new resource to Terraform Provider using Terraform SDKv2 (can't use the new Terraform Plugin). One of new resource's attributes is the following: "

Why can I not connect to an RDS Aurora DB via proxy?

I setup a Postgresql Aurora DB and a Proxy via Terraform (code below), which is apparently running fine. But for some reason I can not connect to the DB through