Questions tagged [terraform]

Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.

Features:

  • Infrastructure as Code
  • Execution Plans
  • Resource Graph
  • Change Automation
392 questions
51
votes
1 answer

What does "Error: Cycle". means in Terraform?

The Terraform docs for some weird reason do not explain what "Error: Cycle" means. I've looked everywhere but there is no mention of it on the official docs. (Turns out it is well-known term, a circular dependency, that someone apparently renamed…
Juan Jimenez
  • 717
  • 1
  • 6
  • 12
26
votes
6 answers

Terraform - Use nested loops with count

I am trying to use a nested loop in terraform. I have two list variables list_of_allowed_accounts and list_of_images, and looking to iterate over list list_of_images and then iterate over list list_of_allowed_accounts. Here is my terraform…
vikas027
  • 1,149
  • 2
  • 11
  • 14
12
votes
4 answers

Terraform: Choosing credentials for a remote state file

I have existing infrastructure in Terraform and have been using it for a while. Recently I had swapped the AWS credentials of my local laptop (the creds stored in ~/.aws/credentials) and it stopped working until I re-set those credentials back. The…
emmdee
  • 1,935
  • 9
  • 35
  • 56
10
votes
2 answers

How to fix "NoCredentialProviders: no valid providers in chain. Deprecated."?

Here is a terraform script I lifted from this repo provider "aws" { region = "${var.aws_region}" profile = "${var.aws_profile}" } ##---------------------------- # Get VPC Variables ##---------------------------- #-- Get VPC ID data…
Anthony Kong
  • 2,976
  • 10
  • 53
  • 91
8
votes
1 answer

What is the meaning of `private` attribute in `tfstate` (for a DynamoDB instance)?

I’m bootstrapping my terraform remote state by storing the tfstate of creating an S3 bucket and a DynamoDB lock table and storing it in git. My organisation scanned the repository using Yelp/detect-secrets and flagged the line containing private as…
oschrenk
  • 223
  • 3
  • 5
8
votes
1 answer

Worker Group VS Node Group EKS

I am trying to use https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/12.2.0(Terraform AWS EKS provider) What is the difference between worker nodes and node group?
7
votes
1 answer

Terraform wants to rebuild my entire AWS deployment

I have an AWS environment that was built 100% with Terraform. I haven't touched it in a few days, but today when I went to make what I thought was a fairly trivial change, Terraform has decided that it wants to build me an entire new AWS…
Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
6
votes
3 answers

How to add lifecycle rule to an existing AWS S3 bucket with Terraform

I have an existing S3 bucket and I wish to add "folders" and lifecycle_rules to it. (I say "folders" because that is how they are represented at the client end, as they are accessed via a Storage Gateway.) I can create the folders, for example on to…
prowla
  • 71
  • 1
  • 4
6
votes
1 answer

How to configure cross region VPC peering on AWS with Terraform

I'm trying to create a terraform configuration to spin up multiple VPCs in different regions and create VPC peer connections between them. This is my module for the VPC # Required Variables variable "region" {} variable "cluster_name" {} variable…
rvabdn
  • 235
  • 2
  • 11
6
votes
1 answer

Storage account name already exists

When I attempt to run the code at the bottom I get the following error (no matter what I name the storage account) currently its named "functions" but I could call it "bannanas" and it would output the same error? ERROR I ENCOUNTER :( "1 error(s)…
wildstallion
  • 61
  • 1
  • 2
6
votes
2 answers

Terraform: How to prevent ASG ec2 instance coming up before NAT Gateway is created

I'm using 2 modules. One is a custom VPC module and the other is a module to bring up a jenkins ec2 instance. You can't use depends_on with modules but the Jenkins module does rely on certain outputs from the VPC module like so... …
Levi
  • 253
  • 1
  • 10
6
votes
3 answers

Why is terraform erring with 'SignatureDoesNotMatch: Signature expired'?

I started getting the following when running terraform commands: $ terraform refresh Error refreshing state: 1 error(s) occurred: * SignatureDoesNotMatch: Signature expired: 20170226T035111Z is now earlier than 20170227T013047Z (20170227T014547Z -…
AXE Labs
  • 1,519
  • 5
  • 19
  • 24
6
votes
2 answers

How to use terraform.io to change the image of a stateful server without downtime or data loss?

Say I have application servers, database servers, and a few dns-round-robin load balancers. All this powered by images created with Packer with deployment managed with Terraform. How do I change the image of the database servers without nuking their…
jpadvo
  • 183
  • 1
  • 5
5
votes
1 answer

Changing variable used for sensitive value in Terraform without rebuilding the resource

I have a Terraform module that sets the administrator password based on a variable admin_password = "${var.local_admin_password}" However, var.local_admin_password is no longer the only place that the password can come from. I need to change the…
Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
5
votes
3 answers

How can I find the version of all Terraform providers in a workspace?

I can't find the canonical way to report the version of a specific terraform Provider, in this case the AWS provider. I can find a binary that seems be named with version information: $ ls…
remeika
  • 151
  • 2
  • 5
1
2 3
26 27