Questions tagged [terraform]

For questions about Terraform, an open source tool to maintain infrastructure.

Filter by
Sorted by
Tagged with
0 votes
2 answers
1k views

Is there a way to install a private key for a user with cloud-init?

I have a user that needs to authenticate against a company source repository when using git clone. To set this up for the user I need to specify a users private key (not the host private key in /etc). ...
Evan Carroll's user avatar
  • 2,069
63 votes
7 answers
27k views

How can I manage secrets in .tf and .tfstate?

I would like to use the Terraform MySQL Provider to keep a list of mysql users and grants handy for creating new test environments. The .tf and .tfstate files both seem to want to store the MySQL ...
Anthony Neace's user avatar
29 votes
2 answers
32k views

How to use cloud-init with Terraform?

I am working with Digital Ocean and Terraform and I already can automate the domain, subdomain, network preferences and the host but there is a section called User data that looks like this: The ...
Gepser Hoil's user avatar
  • 1,312
13 votes
1 answer
2k views

How to support releasing new versions of the code, running in parallel with the last stable release?

I have one service in production (on AWS), which follows the immutable server pattern. Its deployment looks like this: Create a new AMI with Packer. Create a new CloudFormation stack, starting with ...
Philipp Claßen's user avatar
4 votes
1 answer
5k views

The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment"

Why do I get this error with Terraform, The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment". You can see the resource ...
Evan Carroll's user avatar
  • 2,069
2 votes
1 answer
693 views

Is it possible to store your state for different Terraform Workspaces separately?

Let's say I have a terraform project with a production and development workspace. Is it possible to store the development workspace elsewhere so I don't have to give the admin the ability to run ...
Evan Carroll's user avatar
  • 2,069
2 votes
1 answer
7k views

Terraform | Upgrade to 0.12 error Reference to "count" in non-counted context

I'm trying to upgrade terraform from 0.11 to 0.12 but receiving error: Error: Reference to "count" in non-counted context on main.tf line 33, in data "aws_subnet" "public": 33: id = data....
Stailas's user avatar
  • 75
1 vote
1 answer
763 views

What does "eksctl create iamserviceaccount" do under the hood on an EKS cluster?

AWS supports IAM Roles for Service Accounts (IRSA) that allows cluster operators to map AWS IAM Roles to Kubernetes Service Accounts. To do so, one has to create an iamserviceaccount in an EKS cluster:...
HsnVahedi's user avatar
  • 155
1 vote
2 answers
3k views

Terraform organising modules/code for multiple projects

I'm fairly new to TF and wonder how people are structuring Terraform for bigger infrastructure. We are moving our infrastructure to Terraform bit by bit. I'm curious how people are approaching that. ...
BartZ's user avatar
  • 111
0 votes
1 answer
344 views

How can I get my clouds.yaml file from OpenStack Horizons?

OpenStack can export a configuration file called clouds.yaml. How do I export this file from the Horizon's interface?
Evan Carroll's user avatar
  • 2,069
0 votes
1 answer
284 views

How does a new network and subnet have FQDNs without DNS Nameservers?

This is an extension and a simplification of my prior problem. I have created a Network Subnet A port attached to the above network and subnet A compute instance on that port. With the following ...
Evan Carroll's user avatar
  • 2,069
0 votes
1 answer
2k views

How do I upgrade or pin a Terraform Provider?

This is a follow-up to The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment". The crux of it is, I'm using 3.75.1 of the AWS provider, and I need to ...
Evan Carroll's user avatar
  • 2,069