Questions tagged [terraform]
Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
416
questions
0
votes
1
answer
22
views
AWS instance connect decrypt password is giving error as invalid private key, how to fix it?
I have cretaed an instance using terraform code and also its key pair for windows.
To get the admin password I clicked on the below decrypt button and getting as invalid decrypt key.
Please suggest ...
0
votes
1
answer
29
views
Terraform init error: Failed to download module (local changes would be overwritten)
I have a brand-new local Terraform project that I have just cloned from gitlab. I have not made any changes to the code, but when I run terraform init I get the following error, repeated for every ...
0
votes
0
answers
12
views
Azure outputs outdated public IP-address
I have a Terraform file called azure.tf which is supposed to deploy a Virtual machine to Azure and afterwards SSH to said machine to run an Ansible playbook. The problem is that everytime i run ...
0
votes
0
answers
13
views
Terraform state/files disagrees significantly with application timestamp.games
So, I have a constellation of Terraform projects. I just built an image of a specific application, which ultimately ends-up updating the tags in the auto-vars file of the corresponding project in the ...
0
votes
0
answers
24
views
Modification timestamp of Terraform state/files disagrees significantly with application timestamp
So, I have a constellation of Terraform projects. I just built an image of a specific application, which ultimately ends-up updating the tags in the auto-vars file of the corresponding project in the ...
0
votes
0
answers
7
views
How to import an aws_spot_instance_request into Terraform?
I'm looking for a way to import an aws_spot_instance_request into Terraform.
I already made a Spot Request on AWS console, now I would like to put this request on my code. How can I do that?
In the ...
0
votes
0
answers
45
views
SSH Keys not propagating correctly from instance metadata to authorized_keys: missing keys, user discrepancy, and duplicate key
I want to add eight public keys via instance metadata to avoid adding them manually (i.e.: ssh to VMs, pasting the keys to .ssh/authorized_keys, etc.).
I added the keys in Terraform (four distinct ...
0
votes
1
answer
14
views
Upgrade azure VM basic SKU to standard using terraform
I am performing the same task, upgrading the azure VM public ip SKU
from basic to standard but using terraform code. My plan is
Disassociate nic from UI
Include SKU = "Standard" in my ...
0
votes
0
answers
19
views
How to add username and password based uthentication to kubernetes dashboard using helm and terraform?
I have this terraform config for deploying a kubernetes dashboard to my cluster on VKE.
resource "helm_release" "my-kubernetes-dashboard" {
name = "my-kubernetes-dashboard&...
-1
votes
1
answer
47
views
Provisionning a GKE cluster stuck at Deploying step
I am provisionning a simple GKE cluster thank to terraform with the more basic config and it is stuck at "Deploying"
"64% - Cluster is being deployed..."
And in my terminal
...
0
votes
1
answer
38
views
How to set a default account for multiple aws providers in terraform?
I need to create resources for multiple accounts in my terraform code.
So, I have created multiple providers in aws and using the same for individual modules.
Other than above, if I create any ...
0
votes
1
answer
84
views
Restoring Terraform state from backend
My Terraform Git repository ended-up having some unreconciliable data error and I couldn't push a recent change. I exported my commit to a patch, recloned, applied the patch, and then realized I just ...
0
votes
0
answers
21
views
How to snooze all cloudwatch alarms at specific time?
I am trying to setup snooze option for all alarms in my AWS account. To accomplish this I have tried the below terraform code. I kept my account id as dummy value 12345678.
resource "...
0
votes
1
answer
139
views
How to correctly pass firewall rules to the google-terraform-network module?
I want to create a network using the google-terraform-network module. Additionally, I want to pass the firewall rules I made as a parameter to the module so that the created network contains these two ...
0
votes
0
answers
143
views
Why can't my ECS Fargate cluster write to my mounted EFS volume, all deployed with Terraform?
I've got a Terraform deployment that deploys a Docker image into ECS Fargate. It attaches an EFS volume to the container. When I SSH into the container, I see the volume mounted, but I am unable to ...
0
votes
1
answer
62
views
How do I get rid of the deprecation warnings on my aws_route_table definitions?
All of my route table definitions throw a deprecation warning during the plan/apply stages. I can't figure out how I should be defining my routes so that I stop getting these warnings.
Here's an ...
0
votes
0
answers
84
views
How to escape {{ in AWS SSM?
We're using Atlantis & Terraform to set SSM values. One of the parameters contains raw {{ ... }} in the same syntax used by SSM for dynamic parameters.
AWS SSM refuses the value with:
Error: ...
0
votes
0
answers
48
views
alarm for direct connect is showing insufficient data with terraform, how to fix that?
I tried creating alarm for direct connect using this link.
But it is showing insufficient data, so I tried creating manually from aws console and it is working.
So, did a side by side comparison and ...
0
votes
1
answer
154
views
Is there a way to render the output of a data resource before run terraform apply?
I would like to be able to see the JSON of a data resource (like a policy document) on the plan. Currently these type of resources only "renders" during the apply.
I want to know if there is ...
0
votes
0
answers
1k
views
invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
enter image description here
Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Error: Get "http:...
1
vote
1
answer
184
views
Why does Terraform want to fully delete aws_iam_policy_document?
I don't understand why Terraform wants to remove the json policy. In other cases, when the data will be read during the apply, the plan shows the json policy being removed and added in the same plan, ...
1
vote
0
answers
71
views
GitLab CI Runners faild InvalidParameterCombination: Cannot find upgrade path from 5.7.38 to 5.6 , Terraform
GitLab CI Runners faild the jbo with the following error message
│ Error: Error modifying DB Instance legacy-dms: InvalidParameterCombination: Cannot find upgrade path from 5.7.38 to 5.6.
│ status ...
0
votes
1
answer
554
views
AWS EKS Cluster : InvalidParameterException: Unsupported Kubernetes minor version update ,Terraform Gitlab CI
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
69
views
How to fix permission error of Ebs volume using Amazon Data lifecycle manager?
I applied the terraform code in this link, which contains code to apply the specific roles and permission s to service dlm lifecycle for ebs volumes.
But still I am getting access errors.
Please ...
0
votes
0
answers
167
views
the policy type identity_policy does not support the principal element, how to fix that?
I am trying to create this policy through AWS web console instead of terraform.
But getting error as in below screen.
Please suggest
0
votes
0
answers
28
views
Best approach to translate specific AWS SageMaker configuration needs into Terraform
Goal:
Provision a SageMaker instance on AWS with Terraform.
Problem:
There does not seem to be a go-to Terraform module for SageMaker that is easily configurable or extensively documented. I've tried ...
0
votes
1
answer
265
views
Can't set up the GCP's external load balancer to work correctly with Terraform
Using Terraform, I want to build an infrastructure that consists of an external load balancer (LB) and a MIG with 3 VMs. Each VM within the MIG should run a server that listens on 80. Furthermore, I ...
0
votes
0
answers
27
views
Terraform advice - structure
I am starting using Terraform and imported my current infrastructure from Azure using aztfy (im starting to think that was a bad idea...)
Now I have all my resources in in single main.tf file... ...
0
votes
1
answer
417
views
Cloudflare API token permission to edit terraform cloudflare_list resource
Recently I had an API Token that allowed me to access Terraform cloudflare_access_rule and cloudflare_list resources. That token expired, and to my surprise, it vanished from the UI, so I cannot see ...
0
votes
0
answers
45
views
How to iterative over public/private subnets in the Terraform VPC module?
I'm trying to define public and private subnets as input variables to the Terraform vpc module. How can I reference my private/public subnet variables in an iterative statement rather than hard-coding ...
0
votes
0
answers
148
views
Terraform running Helm deploy against AKS fails with "failed to find any PEM data in key input"
I'm setting up a one-click deploy of an environment for some webservices, in which Terraform is used to deploy the infrastructure and then run Helm to populate it. The Terraform step is working fine ...
2
votes
1
answer
409
views
how to generate terraform code of existing AWS EKS cluster?
I created EKS cluster on my AWS account, finished all necessary configurations, the environment is working as expected. Now I would like to generate terraform code to have a possibility to create ...
2
votes
1
answer
1k
views
How do i fix terraform invalid JSON policy
I am trying to use a file which contains load balancer iam policy for my AWS in terraform. However when i run the terraform script, i get an error stating:
Error: "policy" contains an ...
0
votes
1
answer
601
views
How do i add a security group as an inbound rule to another security group in terraform
I have a Terraform codebase which deploys a private EKS cluster, a bastion host and other AWS services. I have also added a few security groups to the in Terraform. One of the security groups allows ...
0
votes
1
answer
264
views
Terraform aws_key_pair creates weird key
I've been researching and testing deploying stuff with terraform, aws secretsmanager and basic ec2 instances.
I got it working. Well, the instance comes up, keys are created, and a remote-exec using ...
0
votes
0
answers
581
views
GitLab Managed Terraform tf.state backend fails
I am trying to run Terraform with AWS provider using GitLab CI/CD.
I was using the backend as S3 to store the tf.state file and everything was working fine.
As part of a research, I wanted to ...
1
vote
1
answer
132
views
Change formatting of IPv6 address in Terraform
I'm running into problems with DNS and ipv6 addresses with Terraform. I'll get an address like 2345:0425:2CA1::0567:5673:23b5 from Digital Ocean, Vultr, etc. That gets sent that to Constellix for ...
0
votes
1
answer
417
views
terraform: Configuring load-balancer to use dynamic port of ECS task/service in AWS
This is sort-of a general question for how dynamic port assignments are supposed to work, though my specific context is trying to figure-out if there is a natural way for a target-group to know the ...
0
votes
0
answers
171
views
I want to use same terraform code for both kubernetes clusters Oracle (OKE) and AWS (EKS)
I want to use same terraform code for both kubernetes clusters oracle (OKE) and AWS (EKS) and install the argocd helm chart on it, I given my code below for your reference, now the problem I am facing ...
0
votes
0
answers
69
views
How to convert terrraform to kubernetes helm chart?
Our current project is created using terraform templates.
Both the infrastructure and the application deployment is on terraform yaml files.
Is there anyway to convert the application part to helm ...
0
votes
1
answer
550
views
ECS service is not starting tasks
Hello I am using aws ecs and terraform to deploy a few containers. I am trying to create an ecs cluster with ec2 instances and in each instance I want to run two nginx containers. I have a load ...
0
votes
0
answers
17
views
Setting Organizational Level Git Permissions
What's an easy way to set organizational-level policies and defaults for repos within an org? For example, I'd like all of our current and new repos to have the following unless the repo admin opts ...
0
votes
0
answers
52
views
How do I connect an EIP to a classic load balancer in AWS using Terraform?
I want to associate some permanent IP address to a load balancer on AWS. How do I do that? Do I use an EIP?
I'm new to AWS, and I'm new to Terraform. I had made the assumption that I could create an ...
0
votes
1
answer
57
views
using terraform or aws cli how to enable/tick "Enable load balancing" when creating an application (codedeploy)
In AWS when creating a Codedeploy/application, how to enable the "Enable load balancing" option using the awscli or terraform?
Using the command line I can only select/define the target ...
0
votes
0
answers
116
views
on alpine linux, failing to install terraform modules of gcp, how to fix that?
I am trying to run on a docker image of alpine.
Configured all the tools also in it and the public docker image is:
docker run -it udayprojectn/alpinegcloud:1.0 /bin/bash
When I ran terraform init, I ...
0
votes
1
answer
725
views
What permissions to set in service account for project creation?
When I configure google cloud cli with my credentials, it is able to create a new project and create resources inside it.
But, for automation purpose in a pipeline, not able to use with my credentials ...
0
votes
0
answers
277
views
Running Jenkins in Docker cannot use terraform docker provider
I don't know what possessed me to do this. I am just a tinker so I started following this tutorial. https://www.jenkins.io/doc/book/pipeline/docker/ I got that to work. Then I wanted to create a ...
1
vote
1
answer
2k
views
Terraform Escape sequence selector
I have password with f\3tix#
I created variable in below format
Variable password{
Type = string
Default =“f\3tix#”
}
When I run terraform validate I am getting error "symbol 3 is not ...
0
votes
1
answer
62
views
Both C and D drives behave as non-persistent, even though i have set C drive as "non-persistent" and D drive as "Persistent"
Is it the disk, which behaves as persistent and non persistent or the VM?
I have a VM on my vsphere with two disk drives ( C and D ), Both Drives are marked as THIN PROVISIONED. this machine is being ...
0
votes
0
answers
134
views
Most simple way to setup forwarding proxies using AWS?
I'm currently looking at a task where I guess that I'm lacking some networking background, despite it sounds rather simple in theory:
For collaboration we're using a dedicated repo server located in ...