Skip to main content

Questions tagged [terraform]

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

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

How can I get the IP of the talos vm on PROXMOX

I want to create a K8s cluster with Talos VMs using Terraform's Talos and Proxmox providers. However, even when the qemu agent is enabled on the Proxmox level, it does not work because Talos does not ...
Edik Mkoyan's user avatar
1 vote
1 answer
125 views

Terraform `aws_eks_node_group` Ready But Create Never Completes

I have a terraform setup where I create a new launch template and a node group. Without the launch template everything works correctly. With the launch template, the nodes become ready but the node ...
bulletshot60's user avatar
0 votes
0 answers
414 views

AWS EKS Cluster : InvalidParameterException: Unsupported Kubernetes minor version update ,Gitlab CI, Terraform

The following errors occur every time I run the pipeline │ Error: error updating EKS Cluster (business-staging) version: InvalidParameterException: Unsupported Kubernetes minor version update from 1....
sam23's user avatar
  • 69
0 votes
0 answers
138 views

How to install VMTools on Win VM Terraform

I want to install VMTools on Win VM post deploying OS using Autounattend.xml using Terraform. Can somebody help me in this? I am using terraform and installed WIN OS VM on my vSphere server using an ...
user avatar
0 votes
1 answer
482 views

Can Terraform conditionally create a resource or use a data source?

I have a Boolean called "loose", based on it's value I want to use an existing resource or create one, let say a security group. I would like to avoid using terragrunt.
Edik Mkoyan's user avatar
0 votes
2 answers
6k views

AWS: How to provide missing Public IPv4 DNS

UPDATE: rewritten question I have an ec2 instance launched via terraform which is unreachable; I manually launched the exact same type of instance, based on the exact same image and was able to ...
yen's user avatar
  • 133
1 vote
1 answer
190 views

Persisting data for amazon ec2 instance running postgres

I am provisioning a cheap postgres instance for myself by installing directly on amazon ec2. Everything will be deployed using terraform. I would like the database data to persist between restarts / ...
yen's user avatar
  • 133
0 votes
1 answer
474 views

Terraform setup of postgres conf files (pg_hba_conf + postgresql.conf) via User Data on AWS ec2 instance

I am setting up a cheap postgres server on amazon ec2, using Terraform. I know I can add a User Data file when setting up a ec2 instance. I know that with terraform, I can provide that User Data ...
yen's user avatar
  • 133
0 votes
1 answer
134 views

What IAM policy is appropriate for gitlab S3 buckets when using KMS encryption?

I'm setting up GitLab with S3 storage backend and would like to use KMS to encrypt the buckets. I'd like to avoid giving out permissions broadly. I'm using terraform to provision these resources. How ...
flickerfly's user avatar
  • 1,101
1 vote
1 answer
536 views

How can I employ a "truly" dynamic inventory with Ansible, which changes along the way when new hosts become reachable?

I provision virtual machines dynamically and they become reachable along the way, whilst my playbook is already executing. How do I obtain a "truly" dynamic inventory? By "truly" ...
Richard Gomes's user avatar
1 vote
1 answer
36 views

Downloading Terraform onto linux OCI VM

I am currently trying to play around with some tf scripting in an OCI compartment I have access to. My current position is: I have successfully spun up a VM through the OCI console running Linux 8 on ...
user avatar
1 vote
1 answer
1k views

Terraform nested maps for_each

I have created this terraform variable. variable "test" { default = { map1 = { secrets = { "user" = "user" "pass" = "123456&...
Aleksandr Marchenko's user avatar
2 votes
2 answers
4k views

Terraform: Interate over map and access child values

I have a terraform variable defined like that: variable "domains" { default = { instance01 = [ "example.com", "www.example.com", "staging....
ungeblauscht's user avatar
0 votes
0 answers
215 views

Terraform AWS - cannot connect to EC2 instance (SSH port is not accessible from outside)

I am trying to build myself an small EC2 instance that is being launched into an VPC with EIB and a Subnet / Internet Gateway and Security Groups. main.tf resource "aws_instance" "live&...
Max's user avatar
  • 101
0 votes
1 answer
86 views

Terraform - huaweicloudstack provider - unable to login with ssh key

With the help of terraform and huaweicloudstack provider I created ECS instance with specific ssh key, but I cannot login nor with key, neither with admin password. If I create machine manually ...
Sigi's user avatar
  • 11
0 votes
2 answers
287 views

less -R does not show colors when processing ANSI colored text via a pipe

The command terraform show does NOT show colored text but the command terraform show | less shows output with what seem to be text color codes: ESC[0m#module.vpc.module.label.data.null_data_source....
Oliver's user avatar
  • 143
0 votes
1 answer
407 views

What is the proper syntax to access attribute (public_ip) of a resource (aws_instance) with count from another resource (null_resource)

I am new to terraform and this issue is perhaps addressed earlier. Unfortunately, I am not able to find one. Question: What is the proper syntax to access attribute (public_ip) of a resource (...
Sam's user avatar
  • 1
0 votes
0 answers
207 views

terraform init command failing on authorization

Terraform init is failing on authenticating. I have manually specified access key, etc in the vars file as specified below. When I am looking at terraform init log, it is erroring out on different ...
Daniel's user avatar
  • 125
0 votes
0 answers
862 views

Not able to run terraform from jenkins

I am trying to run a terraform command from jenkins pipeline but I am getting an error stating that, "terraform command not found". I have installed terraform plugins as well as in the system where ...
Shiva's user avatar
  • 1
1 vote
1 answer
696 views

Hashicorp Vault PKI Intermediate request missing private key

I try to set up some PKI structure, but when I request an intermediate CSR from vault, no private key is sent back. Neither in Terraform where I try to implement it, nor via the API. I tried: The ...
Franco Arendholz's user avatar
0 votes
1 answer
950 views

Authenticate Terraform with Okta

The company I work for uses a legacy login from okta for AWS. Thus, in order to use the aws-cli, the aws-okta utility is needed, which requires okta MFA before running any aws-cli command. I'm ...
sant016's user avatar
  • 101
1 vote
0 answers
2k views

to create a tomcat server by terraform code [closed]

provider"aws" { access_key = "AKIAJ7STPAZVP4ZT74HQ" secret_key = "YRxdYqpOLDRCnPcKMBTL0dCSTFGILdd0brw2LlWq" region = "us-east-1" } resource "aws_instance" "example" { ami = "ami-...
kathikeyan C's user avatar
0 votes
1 answer
225 views

Install issue with Terraform on centos 7

Whenever I run a terraform install on linux using: wget https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip sudo unzip ./terraform_0.11.13_linux_amd64.zip sudo mv ...
James Ukilin's user avatar
1 vote
0 answers
569 views

Terraform with tflint in VSCode [closed]

I've found some issues with tflint parsing some values when I try to access data in some maps. First of all, I create aws_health_check with count set to 2. Then, I create aws_dns record, with same ...
n0zz's user avatar
  • 11
0 votes
1 answer
248 views

random_pet in Terraform: Error: Cycle:

I am trying to generate random hostnames for a couple of servers. However when running terraform apply I get an error message "Error: Cycle: random_pet.swm01_managers, hcloud_server.swm01_managers" ...
Rick McClatchie's user avatar
1 vote
3 answers
13k views

How to uninstall terraform - Windows PC

I've been looking around on multiple sites on "how to uninstall Hashicorp's Terraform" and I only get back - "Install" results. Does anyone have info on this? I did look on Hashicorps' site but ...
gudguy1a's user avatar
2 votes
0 answers
826 views

terraform - remote backend. Error locking state: error acquiring the state lock: resource not found

ill start off by saying I am fairly new to using Terraform so if this is a dumb question I apologize in advanced. So, I am getting the error listed in the title when attempting to run any "terraform ...
TheEZ1's user avatar
  • 21
0 votes
1 answer
735 views

How to add existing role to existing ec2 instance using terraform?

I am running following code but getting exit status 255 error My resource.tf file resource "null_resource" "create-instance-profile" { provisioner "local-exec" { command = "aws iam create-...
Ajay Patil's user avatar
0 votes
1 answer
681 views

Join a VM to domain automatically which was created using terraform

How do I join a VM created using terraform to domain? I tried using resource azurerm_virtual_machine_extension with azure,VM got created successfully but domain joining dint happen. Error:Code="...
MeghP's user avatar
  • 1
1 vote
0 answers
68 views

Terraform , need help to import existing ressource to a module ressource

I would like to import an existing resource into my module. This is my "old" vpc file: https://pastebin.com/DVsacfwt My new one using the terraform registry vpc module: https://pastebin.com/KDrA0Db3 ...
ELIZABETHHHHHH's user avatar
1 vote
1 answer
2k views

Terraform AWS Security Group Ingress Rules

How do you define multiple Ingress rules in an AWS Security Group with Terraform? I've tried this: resource "aws_security_group" "sg_allowall" { name = "${var.prefix}-allow" ingress { ...
Ken J's user avatar
  • 111
1 vote
3 answers
5k views

how to install terraform on linux

I'm trying to install terraform on linux but getting and error curl -o https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_linux_amd64.zip its giving error as curl: no URL specified! ...
Vinay Gowda's user avatar
2 votes
1 answer
992 views

Connect to Azure machine via public ip from terraform

I successfull made the virtual machine in Azure with Terraform ( from a Packer image). After the Virtual machine created, I would run some commands remotely on the newly created machine. The machine ...
GergA's user avatar
  • 173
0 votes
2 answers
2k views

Using Terraform, how can I add multiple search domains to /etc/resolve.conf to an AWS EC2 instance?

in my AWS ec2 linux instance I need my /etc/resolve.conf file to look something like search my.domain my.other.domain nameserver 10.10.10.10 my terraform object looks like resource "...
nick fox's user avatar
  • 151