Category "terraform-provider-aws"

packer unable use filter to pick the correct image-id (amzn-Linux2)

I am trying to use packer to create a new AMI. I want to use the base image as "ami-03ededff12e34e59e" ( Amazon Linux 2) I am using the following filters : data

Using aws_s3_bucket_cors_configuration for multiple cors_rules with terraform aws provider version 4

In aws provider version 3, we defined the cors_rule in the aws_s3_bucket resource like this: resource "aws_s3_bucket" "bucket" { ... dynamic "cors_rule" {

aws_directory_service_directory in terraform leaves SG wide-open

I've built an AD directory with Terraform in AWS but SecurityHub recently pointed out that the SG it created has a bunch of ports wide open with 0.0.0.0/0. Than

Terraform aws_s3_bucket_replication_configuration can't generate multiple rules with for_each

I have an S3 bucket with the following "folder" structure: Bucket1----> /Partner1 ----> /Client1 ----> /User1 | | |-

How can I do so that policies are not attached when I want

I have a problem I need groups to be created and policies attached to those groups but I also need that if the variable policy_name is equal to "" he does not b

terraform validation error despite changing the character count

I am facing with the below error but upon checking, i have realized and reduced the characters to less than 20character for the name but I am still getting the

terraform for loop list for target_groups with a combine variable

Is there a way to use the below list in a for loop and add in the target_groups ? I am trying to use the prefix with target_groups variable in a for-loop. I h

Terraform is throwing InvalidArgumentException Duplicate ProcessorParameter passed to ProcessingConfiguration on Kinesis Firehose dynamic partitioning

I'm trying to create a Kinesis Firehose using terraform with dynamic partitioning using two partition queries from the JSON I'm recieving, my processing configu

Terraform and tagging AWS resources from an external json file

If I had a json file like this: { "allMyTags": { "owner": "john", "department": "HR", "city": "New York" } } and my AWS provide

How can I invalidate AWS CloudFront Distribution cache using Terraform?

I am looking for a way to invalidate the CloudFront distribution cache using Terraform. I could not find any information in the docs. Is this possible and if so

How to get subnet_id of ec2 instances in AWS using Terraform?

Suppose we have some ec2 instances in AWS. How can we get subnet_ids of these ec2s via Terraform?

Is there any way we can integrate terraform with fastapi?

Is there a way to call terraform deployment utility in service endpoint(fastapi, flask) To summarize Integration of service endpoint with Terraform?

view Terraform output from module using for_each and toset

i have a simple terraform script which makes use of a module, the script creates multiple s3 buckets: main.tf: variable "bucket_name"{ type = list descr

Anyone have good examples of Terraform getting a remote json and assigning TF variables as a module to be consumed by multipe .tf projects?

So I'm looking for some good examples of a module where I can remotely grab a json file and assign TF variables inside of a module to be consumed by several dif

Terraform - AWS Auto-Scaling-Group not deleting when using Suspended-Policy option for 'Terminate'

I've searched online and not found an answer to this anywhere, so apologies if it is a replicate of another question. I've created a CloudFormation Template fro

Internal Exception while creating AWS FMS Policy for CloudFront

I am getting below error while creating firewall manager policy for cloud front distribution. the documentation provide little details on how to deploy a Cloudf

terraform override variables multiple modules with their environment specific variables

I have a terraform repo that contains multiple modules as below. root |-modules | |-module1 | | |- main.tf | | |- variables | |

Terraform ERROR: Inappropriate value for attribute "requires_compatibilities": set of string required

i get the following error message after terraform validate: ############################################################### Error: Incorrect attribute value typ

Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias already exists

When running terraform apply I get the following error Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias alread

Providing access to EFS from ECS task

I am struggling to get an ECS task to be able to see an EFS volume. The terraform config is: EFS DEFINITION resource "aws_efs_file_system" "persistent" { encryp