Skip to main content

Questions tagged [terraform]

For questions about Terraform, an open source tool to maintain infrastructure.

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

Using IaC for docker image management/update?

I was building a simple infrastructure using terraform (for AWS), I came accross the chicken egg of Lambda functions needing an image to be created. The options I envisioned are two: 1 - I decouple ...
pzullo's user avatar
  • 1
0 votes
0 answers
13 views

Delete renamed/removed Services/Pods

I installed fluxcd via terraform on my AKS Cluster. If i rename a Service in the Flux Repo, it deployes the Service with the new name - but doesn't delete the old Service. Is this normal or do i have ...
Andresch Serj's user avatar
0 votes
0 answers
8 views

Error configuring Terraform Community Providers

I'm trying to configure a provider to create a Redshift datashare cluster, but I'm encountering some issues. In the version file, redshift is set to required_providers, And in the root module, I’ve ...
Chiyoung Choi's user avatar
0 votes
0 answers
3 views

Kubernetes is no accepting traffic from my Load Balancer when I deploy it in Terraform in DigitalOcean

When I deploy my ingress controller I get an error from digital ocean dashboard 0/1 Kubernetes nodes accepting traffic -- First I create my kubernetes cluster named avatares_cluster # main.tf ...
Juan Topo's user avatar
0 votes
1 answer
20 views

Flux somehow tries to bootstrap on random cluster

I use terraform to set up a cluster and install fluxcd on it. The cluster is set up correctly (i see both in azure portal). In the bootstrap step however, i get an error showing that flux tries to ...
Andresch Serj's user avatar
0 votes
1 answer
23 views

What is the "best practice" way to set Terraform variable values?

I am looking to understand that the "best practice" view on *.tfvars files is, as there appears to be conflicting schools of thought. "Terraform Best Practices" states that ...
James Geddes's user avatar
0 votes
1 answer
25 views

Importing resource to replace terraform official module

I have a resource created using official AWS terraform module, like: module "my-module" { source = "terraform-aws-modules/efs/aws" } Now, I want to convert that to a resource, ...
Miloš Milutinov's user avatar
0 votes
0 answers
48 views

Create an S3 blobstore on Nexus fails ("The S3 bucket exists but you are not the owner")

Before mentioning my problem, I want to inform you that I'm using terraform and having nexus container running on EC2 orchestrated by Amazon ECS. Here is the objective: I want to create an S3 ...
zonix devWeb's user avatar
0 votes
0 answers
24 views

Terraform or azure tries using wrong storage account type

I'm creating a new storage account, storage container, storage blob, service plan, and finally - function. Everything but the last one is created successfully, and the last step fails with a message: ...
Marek M.'s user avatar
  • 101
0 votes
0 answers
30 views

AWS EKS Fargate pod scheduling issue with Prometheus deployment

I'm encountering a problem with scheduling Prometheus pods on AWS EKS Fargate within my Kubernetes cluster. Here are the details of my setup: I have configured an AWS EKS Fargate profile named ...
Typewriter's user avatar
0 votes
0 answers
29 views

Register gitlab-runner through terraform after deploying the runner as a container

Context and code used Here is the code I produced to deploy any kind of container on Azure. (We are doing the same on AWS and facing the same kind of issues) resource "azurerm_container_group&...
Hybris95's user avatar
  • 103
0 votes
0 answers
10 views

Extract RDS address value using data external in terraform

I am using data external block to extract the address of RDS data "external" "rds_endpoint" { program = ["/bin/bash", "-c", "aws rds describe-db-...
Devang Sanghani's user avatar
0 votes
0 answers
18 views

Terraform: Provider configuration with modules and feature flags

I want to use Terraform to manage many resources on many environments. I chose to create a workspace for each environments. I also use an object to enable or not module on each environement: variable &...
DavJ's user avatar
  • 1
1 vote
1 answer
32 views

Worker Pool in Spacelift showing as 0 workers

I created a private worker using https://github.com/spacelift-io/terraform-aws-spacelift-workerpool-on-ec2 However, my worker pool shows as 0 even though I can see the worker in my AWS Console. What ...
Danielle Murphy's user avatar
1 vote
1 answer
93 views

How can I attach multiple AWS accounts to my Spacelift stack?

How can I connect my Spacelift stack to deploy resources into my multiple AWS accounts? I have a current integration set up, and this works perfectly to deploy resources to my account but how can I ...
Danielle Murphy's user avatar
0 votes
1 answer
420 views

metrics-server on EKS - no metrics to server

I am attempting to setup metrics-server to server my 'horizon pod autoscaling' and manage my app pods scaling based on CPU. I am unable to get the metrics-server to run properly which fails with ...
Don Draper's user avatar
2 votes
1 answer
46 views

How do I export my state from my stack while using Spacelift?

I am currently using Spacelift and on my stack, the state is managed by Spacelift. I am happy with this but I want to export the state to an Amazon S3 bucket, is there any way to do this?
Danielle Murphy's user avatar
1 vote
1 answer
104 views

How can I use modules that are hosted on Spacelift outside of Spaceilft?

I currently have modules that are hosted on Spacelift, I am trying to import a module locally but I may be overlooking as I am getting: Error: Module has no versions │ Module "spacelift.io/...
Danielle Murphy's user avatar
1 vote
1 answer
142 views

Spacelift - local run - is it possible

I am trying to run my Spacelift stack with my files from a local folder, but using all the context / env vars etc that are present in my Spacelift stack, is this possible?
Danielle Murphy's user avatar
1 vote
1 answer
54 views

Why is my private worker crashing on Spacelift?

I am using a private worker on Spacelift but my run keeps failing with the error "worker crashed". This is only happening on one stack, any suggestions?
Danielle Murphy's user avatar
0 votes
1 answer
51 views

Terraform conditions : How to have a multiple values in case of False condition?

I need to have two urls in case if my environment is nonprod(sit,uat,dev) and my application is Techno, otherwise only one url. In order to do that, I have made every string into a list here, so that ...
Devang Sanghani's user avatar
1 vote
1 answer
112 views

Spacelift - external state access - cannot create a workspace error

I am trying to use Spacelift's external state access however I get the following error: Error: Error loading state error │ │ with module.service.data.terraform_remote_state.environment, │ on ../...
Danielle Murphy's user avatar
1 vote
1 answer
140 views

Making AWS EFS Replication play nice with Terraform for disaster recovery

How do I use EFS block replication for disaster recovery when the replica volume is unknown to terraform? After breaking the replication/mirror I need to import the volume into the plan so it can ...
Peter Kahn's user avatar
0 votes
1 answer
51 views

How can I delete Terraform assets and statefiles created in a pipeline using the remote GitLab backend?

Currently I have a detached pipeline which uses the Terraform with the remote Gitlab backend. How can I after the pipeline has run delete BOTH the assets created and the statefile?
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
423 views

Key Vault managed stored account encryption permissions denied

Trying to amend an existing storage account to add Customer-Managed-Key Rotation to it, using key vault, as per the docs from Terraform and MS. Looks like we've done everything right, but we're just ...
Stuart.Sklinar's user avatar
1 vote
2 answers
428 views

How To Convert Jenkins String Parameter To Terraform Map Variable? (Invalid number literal)

Edit (8/16/2023): I figured it out! I'm trying to pass string parameter(s) to a Terraform map variable, but receiving error "Invalid number literal". Jenkinsfile: pipeline { agent any ...
Mark Matlock's user avatar
0 votes
1 answer
513 views

terraform remote state bucket on s3

I want to use a remote state bucket on s3 for my terraform tfstate files (described here: https://developer.hashicorp.com/terraform/language/settings/backends/s3). It looks pretty basic, but in ...
Nstevens's user avatar
  • 103
0 votes
1 answer
61 views

How to pass terraform locals variables into AWS resource template body

I am trying to apply aws conformance pack to my aws account using terraform. I am using the sample aws config rules in cloudformation syntax provided in the awslabs repository. Now from an example ...
George Udosen's user avatar
0 votes
0 answers
43 views

Error creating GCP notebook: Error waiting for Creating Instance: Error code 12, message: GCE unexpected error: RPC::UNREACHABLE: EOF

I'm trying to create a managed notebook for Google Cloud Vertex AI, and the application of the terraform template fails with: Plan: 1 to add, 0 to change, 0 to destroy. google_notebooks_instance....
JamesMatson's user avatar
0 votes
1 answer
173 views

& (ampersand) in Terraform string or/and AWS IAM policy

I coudn't find meaning of & sign in Terraform or/and AWS IAM policy. There is an example in Data Source: aws_iam_policy_document (docs) where you can see Basic Example (docs, github source): data &...
sobi3ch's user avatar
  • 123
1 vote
1 answer
106 views

Is terraform good option for data management

I have complex stack which consists of infrastructure, application and config parts, which are deployed to datacenters around the world. We have custom inhouse configuration system, based on database ...
Shadow's user avatar
  • 111
0 votes
0 answers
80 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 ...
SkogensKonung's user avatar
3 votes
3 answers
833 views

Should I use multiple Terraform projects or only one?

I am starting to build a Terraform GIT project to build resources for azure. Currently my idea is to have a project that is taking care of identity and access topics & to have a project that is ...
Marvin Kern's user avatar
0 votes
1 answer
299 views

Configure Azure Terraform provider to only allow SSH access to my current IP address

After following this quick start guide https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-terraform, running lastb on the provisioned host shows login attempts from many IP ...
davejagoda's user avatar
0 votes
0 answers
261 views

Terraform GCP "API has not been used in project" for the wrong project

I'm trying to create a google_kms_key_ring in project b89d. When I run terraform apply, I can see the google_kms_key_ring project field is set to the project I want: + resource "...
Brad's user avatar
  • 179
0 votes
2 answers
79 views

Is there a way to migrate from HCL with the Terraform provider to YAML?

Currently I have a deployment of an applicationn done with HCL in Terraform. Is it possible to have the terraform provider for Kubernetes output to a directory or in some form the YAML that it is ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
1k views

Terraform - No Infrastructure Changes Detected

I have deployed a Cloudwatch Log Group community module to my terraform stack (sourced from https://github.com/cloudposse/terraform-aws-components) but I have spent more than a day trying to resolve ...
Don Draper's user avatar
2 votes
0 answers
496 views

Terraform init too slow on installing hashicorp/aws

It takes a few minutes to install the following provider but installs modules and other providers quickly. There is an open issue on GitHub for this but no steps for troubleshooting. Installing ...
pdna's user avatar
  • 121
2 votes
2 answers
2k views

Terraform kubernetes_manifest: forbidden: User "system:anonymous" cannot get path "/apis"

Getting the following error with Terraform forbidden: User "system:anonymous" cannot get path "/apis" In context, │ Error: Invalid configuration for API client │ │ with acme....
Evan Carroll's user avatar
  • 2,211
2 votes
1 answer
491 views

Terraform error: Provider "registry.terraform.io/hashicorp/google" requires explicit configuration. Add a provider block to the root module

Is there anyway to find out what triggers a message like this, Provider "registry.terraform.io/hashicorp/google" requires explicit configuration. Add a provider block to the root module and ...
Evan Carroll's user avatar
  • 2,211
0 votes
2 answers
1k views

Can terraform re-create a vm that was manually deleted

I have a terraform managed infrastructure with a set of 4 virtually identical VMs. One of them has been deleted in VSphere by mistake. I had expected terraform refresh to re-create it, but I ...
Elros's user avatar
  • 103
0 votes
1 answer
830 views

Terraform's OpenStack provider: Error: One of 'auth_url` or 'cloud` must be specified

When I run terraform apply (but not terraform validate) I get the following error, Error: Invalid provider configuration Provider "registry.terraform.io/terraform-provider-openstack/openstack&...
Evan Carroll's user avatar
  • 2,211
1 vote
2 answers
3k views

How can I read a file if it exists, but if it doesn't do not throw a fatal error?

Terraform give us the ability to a read a local file, which has a secret.. data "local_sensitive_file" "foo" { filename = "/tmp/foo" } But, what is the right way to ...
Evan Carroll's user avatar
  • 2,211
3 votes
2 answers
7k views

How do I find out the attributes of a terraform object?

I'm creating a Terraform file, and something is obviously wrong, Error: Incorrect condition type on ssh.tf line 47, in locals: 47: is_generated = data.local_sensitive_file.public_key ? true : ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
495 views

Is there a way to pass secrets in cloud-init using Terraform?

Cloud-init has the ability to compliment Terraform in configuring the Virtual Machine it just created. My problem is that cloud-init as uploaded through user-data means that the script especially if ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
22 views

Does OpenStack meta data carry the remote-exec provisioner stanza?

I have a Terraform HCL file with a remote-exec provisioner that looks like this.. resource "openstack_compute_instance_v2" "sandboxvm" { provisioner "remote-exec" { ...
Evan Carroll's user avatar
  • 2,211
7 votes
1 answer
6k views

Getting "(sensitive value)" from `terraform state show`, how can I uncensor the value?

When I run I try to use terraform state show on variables flagged sensitive on some addresses I get private_data = (sensitive value) How can I get around this problem?
Evan Carroll's user avatar
  • 2,211
0 votes
2 answers
2k views

How can I use non-TF environmental variables in Terraform?

Let's say I want to read $HOME in Terraform. I could create a variable called HOME and set it with TF_HOME, ie., TF_HOME=$HOME terraform apply But is there a way to read $HOME directly in Terraform? ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
1k views

When running terraform from Gitlab CI, terraform asks me for the "The address of the REST endpoint"

When I run terraform apply using the Terraform files in my GitLab CI Pipeline (I didn't write them) I get the following, Initializing the backend... address The address of the REST endpoint Can ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
399 views

How can I get my clouds.yaml file from OpenStack Horizons?

OpenStack can export a configuration file called clouds.yaml. How do I export this file from the Horizon's interface?
Evan Carroll's user avatar
  • 2,211

1
2 3 4 5
7