Questions tagged [terraform]

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

Filter by
Sorted by
Tagged with
0
votes
3answers
47 views

use metadata_startup_script in google cloud template in terraform

when I want to use metadata_startup_script in template if I use commands in one line it works fine but in pass one line or even if I want to use some html it does not work fine and I face error (...
0
votes
0answers
16 views

Is there a way to add user specific metadata that will show up in gcp audit logs?

GCP audit logs are extensive, they include the caller ip and a bunch of stuff for helping identify who did the thing. But is there a way to add my own metadata/identifier and do that with the gcp ...
0
votes
0answers
15 views

Issue with terraform overwriting ssl on custom hostnames on azure

We are using terraform to set up hostname bindings among other things in azure. We then have a process that periodically updates the ssl certificate. That all works fine. The issue is when we then do ...
0
votes
0answers
20 views

AWS ALB connections are timing out

I'm trying to set up a simple AWS application load balancer instance with a listener that (for now) returns a fixed 200 response. At present all calls to the load balancer are timing out. Reading ...
0
votes
1answer
25 views

Request times out when applying terraform plan on AWS, or describing instances through AWS CLI

I am having an issue accessing the following endpoint from an EC2 instance located in a private subnet. Architecture is the following: VPC Private Subnet 1 (there is a route on 0.0.0.0/0 to Transit ...
0
votes
1answer
16 views

Terraform - Error to provisioning

I am try use terraform to provisioning infrastructure on GCP, but all time i receive this error. Anyone know how i can fix? 2020-05-05T22:08:28.461-0300 [DEBUG] plugin.terraform-provider-google_v3....
0
votes
2answers
36 views

When using the target option in terraform, why does it sometimes return other resources alongside the one targeted?

I was creating a cloudwatch alarm in my ELB stack like so: module "elb_sg" { source = "git@github.com:terraform-aws-modules/terraform-aws-security-group.git" name ...
1
vote
0answers
33 views

Is it possible to install Datadog on AWS using Terraform?

I saw this article which detailed on how to install Datadog on AWS using Ansible: https://www.datadoghq.com/blog/install-datadog-with-ansible-dynamic-inventories/ But the closest I could get to ...
0
votes
1answer
47 views

Terraform waits for ASG removal while doing graceful shutdown of EC2 instances

I use Terraform to set up ASG for my worker servers running sidekiq. On deploy when AMI image_id changes the instances require long graceful shutdown before terminating to finish job processing (max. ...
0
votes
1answer
36 views

Startup script on google instance terraform

I am trying do a startup script on my instance but nothing append, the env variables are not in the system when i loggin on a instance, any ideas ? resource "google_compute_instance_template" "...
0
votes
3answers
125 views

using terraform to download zip file from aws s3

I can't seem to find a documentation that will help me download a zip file from aws s3 to an instance using terraform, can someone help me find a solution to this ? Thank you.
0
votes
2answers
70 views

How to untaint a terraform resource after network issue during application of a terraform plan?

I had applied a terraform to create a redis cluster. Half way through, the application process failed with this error message: Error: Error waiting for elasticache replication group (my-project) to ...
0
votes
1answer
26 views

How is Ansible procedural and Terraform not?

I am trying to understand how Ansible is procedural and Terraform is not. All blogs seem to suggest an example - if you create 2 EC2 instances in Ansible and change the count to 4, you will have 4 ...
-1
votes
1answer
46 views

How do I determine the least privilege permissions for a service account applying Terraform plans?

EDIT: Since I can't "trigger" Recommender to make this calculation, and I can't get at the source dataset, is there an automated way of finding the IAM permissions a service account would need to ...
1
vote
1answer
51 views

Terraform Libvirt - How to use local qcow2 file in the hypervisor instead of cloud images?

It seems like the libvirt provider only takes pre-defined cloud images. I create my own base qcow2 image that is local to the hypervisor and wish to use it as source file with terraform libvirtd. Is ...
2
votes
1answer
44 views

Separate public subnets for VPN access in my AWS VPC

I'm setting up an AWS VPC, and have carved it up into public, cache, persistence and compute subnets. I plan on separating resources in the following way: Public: ELB and VPN network association ...
0
votes
1answer
50 views

Terraform: output IP of all my different servers

I'm starting to use Terraform (0.12) with different types of servers, each associated to a different image. I'm trying to simply output all private IP (I don't know the number before runtime) but can'...
1
vote
1answer
194 views

terraform multiple aws instances multiple subnets

terraform -v Terraform v0.12.23 + provider.aws v2.53.0 I am trying to create 4 instances on put them on 2 different subnets resource "aws_subnet" "private-subnet-1" { vpc_id = aws_vpc....
0
votes
1answer
47 views

How do I reference addresses of eks node group members in terraform?

I have an an EKS cluster created with Terraform using aws_eks_cluster and a managed node group using aws_eks_node_group. I also have certain resources outside AWS, behind a firewall. I'd like to ...
1
vote
1answer
934 views

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.
1
vote
1answer
295 views

Terraform: can't connect to AWS provider using shared config file or static variable

I'm trying to use terraform to manage AWS resources and trying to set up the credentials configuration. I'm following the official documentation: https://www.terraform.io/docs/providers/aws/index.html ...
0
votes
0answers
15 views

Migrating from Monolithic to GCP serverless

We are a small team implementing a migration from a traditional monolithic VM based architecture with on-prem datacentres to GCP serverless and/or microservice architecture. We are starting with some ...
0
votes
0answers
45 views

terraform with helm provider ignore image changes

I am using terraform with helm provider to deploy a helm chart, everything works with terraform, the problem is when the application is already running and I changed the image tag from the gitlab ...
0
votes
1answer
47 views

How can you set up secure Terraform state storage for different infrastructure layers using S3 for backend?

Context After reading a lot about Terraform and playing with it in minor projects, I'd like to start using it in a real, production environment. As the environment is mostly in AWS, I'd go for the ...
0
votes
1answer
71 views

Error: incompatible provider version Terraform v1.60.0

Hello I'm newbie for terraform, I started using terraform official documentation, but I'm facing an issue with in terraform init getting an error like this. Initializing the backend... Initializing ...
0
votes
0answers
28 views

How to resize a disk on CoreOS with Ignition?

I'm setting up a CoreOS host using the Ignition provision utility to mount an external Block Storage volume (XFS) using Systemd moun at Digital Ocean with Terraform. I figured out how to mount the ...
0
votes
1answer
26 views

Terraform provisioning new servers from the same template

Is there any trick to provision multiple aws stacks using previously created terraform template? After applying some changes in variables file in order do not create the same resources but similar ...
0
votes
0answers
20 views

how to run terraform azure infrastructure code to create environment

At the moment, I am running my terraform from my laptop which is obviously less than ideal: module "eu_resource_group" { source = "./modules/resource_groups" ...
1
vote
1answer
113 views

how to keep passwords out of terraform code file

I am creating an azure sql server in azure: I have a variables.tf file which currently has the admin password: variable "sql_server_admin_password" { description = "admin password" default = "...
1
vote
1answer
93 views

How to set instance group manager created instances not simultaneously?

I need instance group manager created multiple instances and then let each instance run a start-up script. But I hope this instance creation has some order or intervals. Cause if multiple nodes run ...
0
votes
0answers
26 views

aws ec2 instance, security groups creation logs from terraform

What is the best place to save the logs of AWS ec2 instance creation, secuirty groups, role creation logs? I am thinking of saving them in S3 on a seperate bucket, but I was wondering if there any ...
0
votes
1answer
75 views

DNS Setup with Azure and terraform - MX records non-functional

How do you set up a Domain MX record on Azure with Terraform's azurerm provider? When you set up an MX record, it is normal to make the name the FQDN "example.com." (at least with BIND). Terraform/...
0
votes
1answer
126 views

Providing master_ipv4_cidr_block and subnet range using terraform variables in GCP

I have created a private cluster in GCP using terraform modules. As per the documentation here: https://www.terraform.io/docs/providers/google/r/container_cluster.html#master_ipv4_cidr_block, I have ...
0
votes
1answer
150 views

How to use Terraform to create GKE cluster and deploy Kubernetes resources

I want to create a GKE cluster and then import it as an existing cluster to Rancher. For the second step I need to install some Kubernetes resources into the cluster. The cluster creation works fine. ...
1
vote
1answer
58 views

Partially Immutable infrastructure in AWS with Packer?

I'm a very young systems engineer/contractor sysadmin with a bandwidth-heavy workload that just moved to an area where I get 2mbps download and 20 upload on my internet connection. I'm moving my ...
0
votes
1answer
214 views

How to predefined AWS security group id using terraform

This script works fine for creating EC2 instances: provider "aws" { access_key = "ACCESS_KEY" secret_key = "SECRET-KEY" region = "us-east-2" } resource "aws_instance" "web" { count = 3 ...
0
votes
2answers
514 views

How to log into new EC2 instance

Trying to connect using CentOS7 I deployed a couple of EC2 instances using terraform and now and trying to log in. aws2 ec2-instance-connect send-ssh-public-key --instance-id i-0788274a4861154d44 --...
0
votes
1answer
1k views

How to store mysql password secret in terraform using aws_kms_secrets

I am following this doc https://www.terraform.io/docs/providers/aws/d/kms_secrets.html As I want to store mysql password in encrypted format This looks good $ aws kms encrypt --key-id arn:aws:...
2
votes
1answer
90 views

How can you automate rolling upgrades of Docker Swarm nodes?

What's the typical process to roll out an upgrade of Docker and other OS updates to a Docker Swarm cluster? Since I want it rolled out, I was thinking of just doing a full Terraform build which will ...
0
votes
1answer
118 views

Where to put local-exec command to run bevor terraform destroy

I have a terraform script that creates an aws security group, a few servers, and some dns records. The servers are RHEL 7, and I register them to the Red Hat network. Bevor I destroy my ressources, I ...
0
votes
1answer
226 views

Want to launch ec2 instance with static public ip using terraform script

I have one staging instance in aws whoose IP is 18.221.1.23. It is an elastic IP. Now I am writing terraform script to automate deployment using packer. Is there any way to assign this same IP while ...
1
vote
0answers
29 views

Terraform, specifying location for vms on datastore

I was wondering as I couldn't find it in the documentation or I've missed it a lot. I am using Terraform 0.12.9 with newest vsphere provider. My goal is to do a clone from a template and it basically ...
0
votes
1answer
94 views

What command do I run to determine what azure terraform provider version I have been using?

How do I determine what version of azure terraform provider that I have been using? I want to remain consistent on the same provider version. Is there a difference between a provider for Azure or ...
1
vote
1answer
2k views

Terraform escape special char

I have to pass a password through terraform which has special characters including backslash. Terraform apply resulted in following error 27: "project.plugin.NodeExecutor.WinRMexe.pass" = "...
1
vote
1answer
75 views

GPU on Terraform GKE Can't access efivars filesystem at /sys/firmware/efi/efivars, aborting

I'm trying to get a GKE cluster (Google Cloud Kubernetes), provisioned by Terraform, running with a GPU node pool. If someone can point me at what I'm missing to get the GPU node pool working, that ...
0
votes
0answers
222 views

Export content of JSON file in Terraform

I have the GCP service account key file in JSON format, which I need to export as GOOGLE_APPLICATION_CREDENTIALS. Is there a way in Terraform to provide the "contents" of this JSON file directly (...
0
votes
2answers
322 views

Unable to export service account key in Terraform #GCP

I have downloaded the GCP service account key to my local system. In Terraform, I have set the GOOGLE_APPLICATION_CREDENTIALS as a path to this file in the startup-script part of my bastion instance. ...
0
votes
0answers
19 views

Mapping 2 strings and returning value in terraform 0.12

variable "services" type ="list" { [ { something="value" }, { something="value" }, ] } services=[ { name="star" string=".in,.com,.ca" interval="10,20,30" } { name="moon" string=".out,.ga,.ha" interval=...
0
votes
0answers
81 views

Terraform: how to pass additional remote-exec to underlying provider

I am in the process of building an open source terraform repository for all my company assets. It is split in the following modules: node: the scaleway provider VMs that are provisioned with custom ...
0
votes
1answer
211 views

How to stop GCP vm instances using terraform

How to stop GCP vm instances using terraform? I have tried changing status of the vm instance, it's available for AWS but couldn't find the way to do it for GCP.

1
2 3 4 5 6