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
2
votes
2 answers

How to resolve the state file version conflict when the state files are kept in git?

My state files are kept along side the terraform files. (I know this is not ideal, but it is what it is at my workplace at the moment. There are plans to move away from this state management model) The goal of my branch is to create a new ec2…
Anthony Kong
  • 2,976
  • 10
  • 53
  • 91
2
votes
3 answers

How to provide the Terraform Cloud API token using an environment variable?

In my CI environment (Bitbucket pipelines) I'm trying to use the new Terraform Cloud remote state management. The announcement video clearly states you can use environment variables instead of the .terraformrc file to pass your API token. However, I…
jorianvo
  • 21
  • 2
2
votes
1 answer

How to recover from this terraform destroy action?

I am trying to destroy some terraform created resources on AWS. Terraform comes up with this plan Terraform will perform the following actions: - aws_lambda_function.myproject-mainprocess-restore-db-from-snapshot -…
Anthony Kong
  • 2,976
  • 10
  • 53
  • 91
2
votes
1 answer

How can I create an SRV record with the UltraDNS or PowerDNS provider in Terraform?

I didn't see any examples of this on the internet so I thought I'd post the solution here.
nowthatsamatt
  • 881
  • 1
  • 8
  • 11
2
votes
2 answers

terraform: modify lb listener

I have a terraform script where I use a module dcos-terraform/dcos/aws to setup my infra, I then make certain modifications like route52 rules and load balancer certificates etc. I am trying to modify the NLB 443 protocol to TLS from TCP with a…
Rohit Hazra
  • 153
  • 1
  • 7
2
votes
1 answer

Creating an Azure VM from VHD failed "is not a valid resource reference"

I am trying to deploy virtual smart zone to Azure via Terraform, but could not succeed many times. Also I read the article existing here. Could you please give me an advice and fix it? Thank you so much. Here are the details: Terraform…
tien
  • 65
  • 3
2
votes
1 answer

Having issues dynamically updating bind with terraform - authentication failures

I'm trying to update a domain hosted with bind using terraform, and getting tsig verify failures in /var/log/named/security.log, but it works when I use nsupdate. I'm generating a key using tsig-keygen -a HMAC-MD5 ns01.ops.example.com >…
Joe Block
  • 696
  • 4
  • 12
2
votes
2 answers

AWS Nat Gateway - Using a non Elastic IP address

I'm building an AWS VPC network lab via Terraform. I want to add a NAT Gateway in order that my private network instances could access the internet for software updates. From the Terraform spec you can see the an "allocation_id" is a required…
RtmY
  • 277
  • 2
  • 9
2
votes
1 answer

Create TPU instance using Terraform

I try to create a TPU instance of Google provider using Terraform but can't find any proper docs about it on the official site. It seems that Terraform still considers TPU as a beta. Anybody else facing this issue?
2
votes
1 answer

Iterating list of list of map

I'm trying to add route53 records form my certificates to validate but I can't get it working. I'm unable to get the right information. Here's an example. variable "my_certificates" { default = [ { zone = "aws.example.com" …
Julien B.
  • 201
  • 2
  • 10
2
votes
1 answer

terraform could not escape single quote

I am trying to escape a single quote in my string: ${join("\n",formatlist("%s ansible_host=%s ansible_ssh_common_args='-o ProxyCommand=\"ssh -W %%h:%%p -q…
Henry TheKing
  • 69
  • 2
  • 3
  • 8
2
votes
1 answer

Terraform - how to use multiple modules to create temporary ressources

I have created two Terraform modules, each creating a simple AWS instance and then provisioning some software on it with an Ansible playbook. Each module works correctly when running terraform apply in the module directory. How would you combine…
JohnLoopM
  • 151
  • 6
2
votes
1 answer

Creating a NAT gateway with Terraform fails with an error

I'm running a private GKE cluster and want to add a NAT Gateway so I can create firewall rules from requests coming from the cluster (by default, the public IP's for all nodes are ephemeral, thus hard to keep track of). I'm trying to follow the…
2
votes
2 answers

Terraform GCP add VM to existing VPC

I'm starting to learn Terraform (I want to manage my growing GCP infrastructure). I'm trying to do an apparently simple thing -- create a VM in the different Project -- but: I already have a VPC configured, let's called it pre-terra-vpc in Project…
kmwil
  • 225
  • 1
  • 2
  • 12
2
votes
2 answers

Use a proxy with Terraform

I am unable to use our corporate proxy with Terraform. I configured the following environment variables (I'm under Windows 7): set HTTP_PROXY=http://proxy.company.local:8080 set HTTP_USER=userID set HTTP_PASSWORD=password But when launching…
Alex
  • 21
  • 1
  • 1
  • 3