Top "Terraform" questions

A tool from Hashicorp used for defining infrastructure as code.

Fix "Interpolation-only expressions are deprecated" warning in Terraform

I upgraded to Terraform v0.12.16 and now I am getting a lot of messages that look like this: Warning: Interpolation-only …

terraform
Upgrade terraform to specific version

Use case I have installed Terraform v0.11.13 via homebrew and as recommended by terraform I want to ugprade to version …

homebrew terraform
How to for_each through a list(objects) in Terraform 0.12

I need to deploy a list of GCP compute instances. How do I loop for_each through the "vms" in …

list loops object foreach terraform
How are data sources used in Terraform?

The Terraform Data Sources documentation tells me what a data source is, but I do not quite understand it. Can …

amazon-web-services terraform
Is there a way AND/OR conditional operator in terraform?

Is there a way to use something like this in Terraform? count = "${var.I_am_true}"&&"${var.I_…

terraform
Terraform aws: Error No configuration files found

I am new to Terraform. I am writing a small script to put a small datafile from my machine to …

amazon-web-services amazon-s3 terraform terraform-provider-aws
How to fix AccessDenied calling CopyObject

I'm trying to copy files from a bucket in A account to another bucket but in B account. When I …

amazon-web-services amazon-s3 terraform aws-cli bucket
In Terraform 0.12, how to skip creation of resource, if resource name already exists?

I am using Terraform version 0.12. I have a requirement to skip resource creation if resource with the same name already …

resources terraform exists
How to attach multiple IAM policies to IAM roles using Terraform?

I want to attach multiple IAM Policy ARNs to a single IAM Role. One method is to create a new …

amazon-web-services amazon-iam terraform
Terraform: Error creating IAM Role. MalformedPolicyDocument: Has prohibited field Resource

My TF code is giving me an error: /* * Policy: AmazonEC2ReadOnlyAccess */ assume_role_policy = <<EOF { "Version": "2012-10-17", "…

amazon-web-services amazon-iam terraform