Top "Terraform" questions

A tool from Hashicorp used for defining infrastructure as code.

Terraform provider/variable sharing in modules

Is there a way of abstracting the provider for all the modules defined in a project. for example, I have …

terraform terraform-provider-aws
Terraform: Output a field from a module

Code Consider a terraform module: module "blah-asg" { source = "asg" asg_max_size = 1 asg_min_size = "${var.min_blah}" ... } My problem …

terraform
MalformedPolicyDocument error when creating policy via terraform

I am getting the following error when running terraform: * aws_iam_role_policy.rds_policy: Error putting IAM role policy …

amazon-web-services terraform
Terraform, getting output from null_resource, local-exec and the AWS CLI

I'm using Terraform to automate provision of Cognito Identity Pools in AWS. The AWS provider doesn't support Cognito yet so …

amazon-web-services aws-cli amazon-cognito terraform
Decoding JSON string to terraform map

I'm using the HTTP data source to retrieve data from an internal service. The service returns JSON data. I can't …

terraform
I would like to run terraform only for a specific resource

It takes a long time to run terraform and wait. So I would like to run it to exclude rds …

terraform
How to check if string contains a substring in terraform interpolation?

How do you check if a terraform string contains another string? For example, I want to treat terraform workspaces with "…

terraform
Terraform: modules + output from for_each

I have a Terraform script using modules. I want to create multiple resources so I'm using the for_each method. …

terraform terraform0.12+
Execute Terraform apply with AWS assume role

I need to execute a Terraform template to provision infrastructure for an AWS account which I can access by assuming …

amazon-web-services terraform aws-codepipeline terraform-provider-aws
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/…

terraform terraform-template-file