Questions tagged [terraform]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
37 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 ...
0
votes
2answers
77 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....
0
votes
1answer
56 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 (...
0
votes
0answers
40 views

How to copy locally generated file into kubernetes pod with terraform?

I'm using openshift cluster and can't find any way to copy a little file with users and their generated passwords. I know how to use variables to these issue, but global variables stay accessible the ...
0
votes
0answers
33 views

Are there any flags that can bypass chtimes check on exfat with terraform init?

Are there any flags that can bypass chtimes check on exfat with terraform? I am using terraform on an exfat drive and can't init because Found version 3.6.0 of terraform-aws-modules/alb/aws on ...
0
votes
0answers
24 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 ...
0
votes
0answers
142 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 ...
0
votes
0answers
763 views

Terraform-Nested Maps and Lists

Terraform version: Terraform v0.12.10 OS version: Red Hat Enterprise Linux Server release 7.6 (Maipo) When I use nested maps to create multiple ebs_volumes and trying to delete intermediate volume, ...
1
vote
1answer
119 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 ...
0
votes
0answers
4 views

Way To Estimate Costs Before Running Terraform In Azure

I have a Dev Azure tenant that I pay for myself. I use Terraform to spin up environments. My latest project that I want to test has a large number of servers. I can destroy the environment ...
0
votes
1answer
305 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 ...
0
votes
0answers
22 views

How can we use “launch Template” in elastic beanstalk using terraform

I cannot find the option for launch template in elastic beanstalk terraform document. Is there any way to use
0
votes
0answers
4 views

Is there a way to restrict number of docker containers on an EC2 node?

Suppose i have a service "APP" running as a docker container with 10 replicas. I want all the 10 replicas (containers) running on individual ec2 nodes i.e 10 ec2 instances for 10 replicas. I am using ...
1
vote
0answers
220 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-...
0
votes
1answer
90 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 ...
1
vote
0answers
158 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 ...
0
votes
0answers
99 views

Getting Handle Is Invalid error when running Terraform init on Windows

I installed Terraform on my Windows 10 development machine. I know that my terraform scripts are correct because they run fine on my colleague's Linux machine. I downloaded my scripts onto the ...
0
votes
0answers
15 views

Terraform with vCloud Director 8.2

Morning, I witnessed an odd issue today that I have not seen any bugs reported on so thought I would ask first. We are coding a very simple project to create the following: vCloud org vCloud User ...
0
votes
0answers
67 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" ...
0
votes
0answers
43 views

Simplify Terraform Configuration

is there any way in terraform to 'simplify' the configuration of things that need to be done to every created resource? I need to attach every server (hcloud_server.swm01_managers) to the network (...
0
votes
2answers
1k 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 ...
2
votes
0answers
412 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 ...
0
votes
1answer
199 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-...
0
votes
0answers
176 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="...
1
vote
0answers
58 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 ...
1
vote
1answer
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 { ...
1
vote
2answers
2k 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! ...
2
votes
1answer
545 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 ...