Questions tagged [terraform]
Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
20
questions with no upvoted or accepted answers
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....
2
votes
0
answers
813
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 ...
1
vote
1
answer
826
views
Terraform nested maps for_each
I have created this terraform variable.
variable "test" {
default = {
map1 = {
secrets = {
"user" = "user"
"pass" = "123456&...
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
...
0
votes
0
answers
7
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 ...
0
votes
0
answers
386
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....
0
votes
0
answers
108
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 ...
0
votes
1
answer
369
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.
0
votes
1
answer
5k
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 ...
0
votes
1
answer
115
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 ...
0
votes
0
answers
208
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&...
0
votes
1
answer
394
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
0
answers
189
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
0
answers
855
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
1
answer
935
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
1
answer
200
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 ...
0
votes
1
answer
235
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
1
answer
711
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
1
answer
621
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="...
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 "...