Questions tagged [terraform]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

Values from `.tfvars` not getting loaded

I am new to terraform and building my first terraform script to launch instances in GCP. Values from terraform.tfvars are not being loaded and only default values from variables.tf are being loaded. ...
1
vote
0answers
6 views

Configure GCP PubSub subscription configured by Eventarc

I'm using Eventarc to connect an GCS event to a Cloudrun service. Eventarc, behind the scenes, will also configure a Pubsub subscription. Is it possible to modify some of the parameters in said ...
-1
votes
1answer
22 views

How to control AWS EC2 live from a web app

We are building some penetration testing stations (both attack & target) for a hackathon in AWS VPC and I need a way to control the following in a live setting: VPN connection access: if someone ...
-1
votes
0answers
15 views

How to ignore destroy and recreate operation on AWS with Terraform?

Since did an aws provider version upgrade before, the current AWS RDS's option group has been added from 1 to 2. Maybe Terraform did it(create a new one and will delete the old one). But the old ...
0
votes
1answer
29 views

Gitlab as Terraform state management with HTTP backend not using project credentials?

I've been working to get a monorepo for Terraform up and running. Terraform is executed inside a container. However, when I try to init the backend for http pointing towards my self-hosted Gitlab, it ...
0
votes
1answer
55 views

Terraform on gcloud: serviceaccounts is forbidden: User “system:anonymous” cannot create resource “serviceaccounts”

I am trying to write terraform code for bootstrapping a GKE cluster (with RBAC) on Google Cloud. The GKE cluster successfully created, but I want to create a service account as wel which I can reuse ...
0
votes
0answers
27 views

Modifying gcp projects in terraform modifies resources

So i have created a project with terraform under an organization. resource "google_project" "my_project" { name = "My Project" project_id = "your-...
0
votes
0answers
36 views

Cannot connect to a Postgres SQL instance from inside a pod within a GKE

I am new to Terraform and Google Cloud. I am trying to create a K8 cluster where pods inside the cluster could communicate with a Postgres server I have within the same VPC. However, when I try to ...
0
votes
0answers
22 views

Using lists to create dynamic blocks in terraform

I have some object-type variable with one field I need to create several blocks being a list of string (var.kubernetes_worker_group_spec.zones): kubernetes_worker_group_spec = ({ node_count = 1 ...
1
vote
1answer
56 views

Terraform complex output from resource with dynamic blocks

I have a resource like this: resource "yandex_mdb_mysql_cluster" "main" { + allow_regeneration_host = false + created_at = (known after apply) + ...
0
votes
1answer
22 views

Can't ssh into an oracle database on Oracle Cloud Integration

I created the database using terraform with the following database system: resource "oci_database_db_system" "test_db_system" { availability_domain = data....
1
vote
0answers
16 views

How can I find out what changes have been made via a terraform apply from CloudTrail?

I'm reviewing a problem in AWS configuration, which is managed via Terraform. I would like to find out if a specific change was made via a local tf apply and by whom. In CloudTrail, I can see events ...
1
vote
0answers
113 views

How to create AWS RDS user using Terraform?

I'm trying to create an application users for my Aurora RDS using Terraform. I can only find links for creating a MySQL user or a Postgresql user but not a generic one for Aurora.
3
votes
0answers
48 views

Changing Terraform code for allowing multiple NICs

we are trying to modify our Terraform infrastructure which we have not built ourselves. The current code does support multiple disks but only one NIC. We tried to modify the NIC part accordingly but ...
0
votes
0answers
13 views

Feasibility of a VM/container per user deployment framework

There have been a couple instances in the past that I have been tasked with building an architecture where, we deploy one VM/container per user. This has been for reasons like: needing each user to ...
0
votes
0answers
26 views

How do I enable aws inventory with terraform?

I have to go to the AWS UI and select "enable inventory" on managed instances- what is aws doing when I click this button? Can I do this with terraform somehow so I dont need to keep going ...
0
votes
1answer
168 views

Running kubectl commands as cronjobs in the Kubernetes cluster results in a connection refused error

When running a kubectl command using the bitnami/kubectl image from inside a kubernetes (EKS based) cluster I am expecting the command to pick up the KUBERNETES_SERVICE_HOST and ...
0
votes
0answers
23 views

Cannot associate Terraform created ASG in Azure portal

I created 2 ASGs, one manually and one via terraform code data "azurerm_resource_group" "core-rg" { name = "core-rg" } resource "...
1
vote
1answer
39 views

AWS ECS task definition workflow

I've setup one of my services to be deployed to ECS (EC2). I have the service and task definition configured via terraform and then to deploy I'm using Github actions where it seems I need to define ...
1
vote
0answers
78 views

unable to authenticate with digitalocean when using terraform

I was previously able to use terraform 0.11 with digitalocean. I have since updated the terraform version to 0.13.5 and updated the digitalocean provider. However, after this change, I am not able to ...
0
votes
1answer
15 views

Is there any way to find Time taken for features in Deployment manager to get available on Terraform?

Can you please help me on getting more info about time to get all features of deployment manager available on terraform?
0
votes
0answers
21 views

How do you configure an RDS installation that is built in Terraform using Terraform without exposing it to the public

I am able to create an RDS server in Terraform and I have the password generated using random provider. What I want to do is once the RDS server is provisioned, I want to create the schemas and ...
0
votes
1answer
84 views

SSH to EC2 instance timedout

I created an AWS EC2 instance to set up prometheus on it, I created a new ssh keypair and provisioned the instance using terraform, I used instance type as "t3.large" and an SSD disk of ...
0
votes
0answers
25 views

Terraforming Windows - Can't Add to PATH

I got a Terraform to deploy a Windows 10 Server, It does fine to do so, but I can't seem to get it to finish this <script> part: Here is the code: <script> @echo off echo Deployment ...
0
votes
0answers
38 views

Terraform Windows Server on AWS - Script not executing?

I have deployed a Windows Server (2019) via Terraform onto AWS. It seems as though my script lines are not being entered when I deploy the server. It deploys the server, but nodejs does not seem to ...
0
votes
1answer
130 views

Do I need Openstack's keypair and cloud-init's ssh_authorized_keys together?

I have an older setup using Terraform and Openstack. Via Terraform there will be keypairs injected to Openstack instances: resource "openstack_compute_instance_v2" "bamboo_agent" { ...
1
vote
0answers
71 views

How does terraform ssh to virtual machines in vsphere if It didn't set a password before

I am trying to deploy a linux VM on Vmware ESXI using terrafom but I don't understand how in the documentation they use a given username and password to ssh to a machine without having set this ...
0
votes
1answer
59 views

How can attach a backup policy to a VM?

I have a question with azurerm provider for terraform: You have the following resources: azurerm_recovery_services_vault azurerm_backup_policy_vm In order to create a policy and vault for backup a ...
1
vote
1answer
189 views

403 when using Terraform to attach Lambda Function to Target Group w/ ALB

I'm able to create Instances, Target Groups, and ALBs just fine with Terraform, but am getting stuck when trying to use Lambda Functions. It looks like the Lambda function gets created OK along with ...
0
votes
0answers
133 views

How to use two repositories from helm and use helm_release terraform

How to use two repositories as Dogwatch uses below commands manually helm repo add datadog https://helm.datadoghq.com helm repo add stable https://kubernetes-charts.storage.googleapis.com/ helm repo ...
0
votes
1answer
358 views

Is it possible to deploy Datadog agents on AWS EKS cluster using terraform

I am looking to understand if anyone can guide me on how to install Datadog agents on my AWS EKS cluster as pods. I am able to complete my requirement by using kubectl commands. But here I am looking ...
0
votes
1answer
280 views

Terraform: Getting the public IP of a Windows vm in Azure

I have been trying to figure out how to get the public IP of a newly provisioned VM in Azure. I use the example in: https://www.terraform.io/docs/providers/azurerm/d/public_ip.html However it doesnt ...
1
vote
2answers
605 views

Terraform: Possible to view a partial diff of private key change or any other info?

Goal: Re-initialize a Terraform project to another workstation. Problem: Terraform wants to recreate one my TLS keys because it thinks the private key has a diff. However since I cannot see the diff ...
3
votes
1answer
2k views

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?
0
votes
1answer
1k views

Terraform: Attach multiple security group to EC2 instance

How to attach multiple security groups at EC2 creation? I have modularized as below: **networking/main.tf** #Web Server Security Group resource “aws_security_group” “web_sg” { name = “web_sg” ...
1
vote
1answer
471 views

Google Cloud Compute Engine persistent disk snapshot schedule not working

i created a VM with terraform on GCP and also a persistent disk separately with the google_compute_disk , google_compute_resource_policy, google_compute_disk_resource_policy_attachment resources to ...
0
votes
0answers
378 views

Using the libvirt terraform provider to attach to system wide network bridge

I'm trying to use the libvirt kvm terraform provider (https://github.com/dmacvicar/terraform-provider-libvirt) to connect an example virtual machine to an existing network bridge I've created. I'm ...
2
votes
0answers
690 views

Cloud Init with Flatcar Linux — Configuration not applying when passing custom file?

I'm using Telmate's Terraform provider for Proxmox and trying to deploy Flatcar linux virtual machines using Cloud Init by passing files via cicustom. Based on their example, I have crafted the ...
0
votes
1answer
53 views

Terraform: How to variablize VPC Subnets

I want to provision 2 domain controller instances in two subnets. VPC, subnets and other networking sections are already created. main.tf resource "aws_instance" "PerformanceDC01"...
2
votes
1answer
99 views

How to renew storage access policy for azure shared file storage using terraform?

Let's assume this simple example of creating shared file storage on Azure using Terraform and azurerm provider. resource "azurerm_resource_group" "example" { name = "...
0
votes
0answers
58 views

How do you terraform an AWS EC2 server that allows SSH where the SSH keys are managed in Simple AD or IAM?

I'm trying to set up my Docker swarm module so that I can use SSH to the servers but rather than building the EC2 instances with predefined users and keys, I would like to use Simple AD or IAM to ...
0
votes
1answer
1k views

Set PubSub Subscription Expiration to Never Expire via Terraform

When creating a PubSub subscription manually you have the option of setting the expiration as "Never expire". Example: I am attempting to manage my cloud infrastructure through Terraform. ...
0
votes
0answers
173 views

terraform - shall one use simple disk or linux LVM?

Is there any drawback of using LVM disks in terraform managed virtual machines? Currently I come to the project where all disks are simple linux disks, but terraform is unable to resize them up ...
0
votes
0answers
34 views

AWS Batch (Re)Create Compute Environment

Larger design pondering here. We have a persistent application living in ECS that manages jobs in a batch queue. The initial idea was to manage all the AWS assets in CI-executed Terraform but I'm ...
1
vote
1answer
552 views

Disconnected NIC on customized & deployed Ubuntu 18.04 templates

Within my vSphere 6.7 U3 environment, I have an Ubuntu 18.04 template generated by packer which I am then using Terraform to deploy two copies of. I am running into an issue where the deployed VMs ...
0
votes
1answer
1k views

A chart install (or helm_release via terraform) always results in “failed to download <chart>”

When installing a helm chart directly (with helm 3), or using the helm provider in terraform, the same error is thrown which implies the download fails, something like: Error: failed to download "...
0
votes
1answer
460 views

Terraform Error: Error initializing Docker client: protocol not available

I am attempting to go through the Terraform install from their website at https://learn.hashicorp.com/terraform/azure/install When I get to the step that says to run terraform apply I get the ...
0
votes
2answers
2k 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
20 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
29 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 ...

1
2 3 4 5
7