20,239 questions
0
votes
1
answer
16
views
Why is my AWS EKS Access Entry not allowing me to access my cluster? [closed]
I'm using Terragrunt/Terraform to setup an EKS cluster:
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "21.8.0"
name = "eks-...
-5
votes
0
answers
38
views
Conditionally create resources when a for_each loop is involved [closed]
I have this working resource decleration
resource "azurerm_backup_protected_vm" "vm-backup-amsbk" {
for_each = { for k in toset(module.amsbk....
0
votes
1
answer
28
views
Resource is tuple with 3 elements
I am trying to extract the virtual machine name from this output:
output "linux_virtual_machine_names" {
description = "The resource id's of all Linux Virtual Machine."
value ...
-3
votes
1
answer
51
views
terraform issue when i add new value in config map
I’m trying to add a new record to my ConfigMap. It’s the third time I’ve done this operation – I made the previous edits in dev and stage – but in prod, when I add the record, Terraform tries to ...
-1
votes
0
answers
34
views
Azure VMSS issue - Failed to update goal-seeking context [closed]
New to Azure, not to the cloud.
I have terraform code provisioned VMSS and it has been running few months okay.
Suddenly since last night my VMSS is failing to boot instances.
I am not using any ...
Advice
0
votes
1
replies
39
views
How to enable user registration form in Authentik using terraform?
I’m setting up Authentik with Terraform (goauthentik/authentik v2025.8.1) and want users to be able to self-register via an OAuth2 application. I couldn’t find any working examples or docs for the ...
Advice
1
vote
3
replies
54
views
Schedule a Terraform destroy and apply of the same resource using Github Actions in Azure
My goal is to schedule a Cron Job using GitHub Actions to destroy and reapply the same resource at specific times — for example, apply at 8 a.m. and destroy at 5 p.m.
Based on my research, I would run ...
-3
votes
0
answers
42
views
Ansible multi-hop SSH inventory works locally but fails when running inside Jenkins container [closed]
I'm currently automating the provisioning and deployment of my multi-VLAN infrastructure using Terraform + Ansible + Jenkins (running inside Docker).
When I run my Ansible playbooks locally (from my ...
-3
votes
0
answers
75
views
How to use the built-in request validators instead of creating new resource?
In order to enforce query params validation, we have to assign Request validator in the method request. In my case I want to enforce required validation to startDate and endDate query params (Validate ...
-1
votes
1
answer
56
views
Set Terraform Child Module Variable Values Conditionally
I have a Terraform child module for an Azure Function App. This Function App also implements an Azure Monitor Alert (referenced from another child module) and provisions a set of dedicated Action ...
-2
votes
0
answers
51
views
How to create child projects with same display name under different parent folders in wiz using Terraform? [closed]
I am new to Terraform and trying to write an automation code to create wiz projects in a parent child hierarchy. The parent folders are created successfully, but when I try to create child projects ...
0
votes
0
answers
35
views
What is the equivalent `TargetCapacitySpecification` spec in a terraform spec?
I'm trying to create a EC2 spot fleet in AWS via terraform script.
From Tutorial: Configure EC2 Fleet to use On-Demand Instances as the primary capacity, I see
{
"LaunchTemplateConfigs": ...
-1
votes
0
answers
41
views
How to use a docker image as source code for GBQ cloud funtions [closed]
Im trying to deploy a cloud function with a docker image as the source code as:
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">...
-3
votes
1
answer
68
views
How do I properly define a complex for_each variable
I am trying to define a list of aws_usage_plans, using a for_each.
I am passing in this variable data:
usage_plan_configs = {
"xsmall" = {"name" = "xsmall", "...
0
votes
0
answers
68
views
Python Function not coming up in Azure FunctionApp
I am deploying a python function in azure linux function app, function app is created via terraform and azure CI/CD pipelines, and azure function also via zip deploy and linux function deploy using ...
-1
votes
0
answers
58
views
Terraform Utility Modules that Clones Azure Verified Module from Github to Azure Devops
I want to create a Terraform utility module that can clone an AVM repository from GitHub and push it to an existing Azure DevOps repo. But I face many issues and Im not able to debug.
Here is the file ...
-1
votes
1
answer
43
views
Issue with OpenTofu tests against AWS Cloudfront Distributions [closed]
I could use an assist on my opentofu tests
Here is a small snippet of my Terraform module
resource "aws_cloudfront_distribution" "main" {
price_class = "...
0
votes
1
answer
51
views
How to automatically extract AWS Lambda configurations to Terraform for GCP migration? [closed]
I'm migrating multiple AWS Lambda functions to GCP and need to generate Terraform configurations that match the existing AWS setup. Currently, I'm manually writing each Lambda configuration, which is ...
0
votes
1
answer
96
views
Can the GitHub Actions bot be bypassed from signing commits by the GitHub Terraform provider?
I have a workflow that automatically creates PRs and it needs to bypass the rules that require commits to be signed. I have looked at the Terraform docs for this and a bypass list looks like this:
...
-3
votes
2
answers
84
views
Terraform Security rules creation in NSG not going through - Inappropriate value for attribute "security_rule" [closed]
I am trying to create an NSG with 2 rules in Azure, when I run
terraform validate
I get
ERROR] vertex "azurerm_network_security_group.app-frontend-nsg" error: Incorrect attribute value type
...
0
votes
1
answer
80
views
Making cloud9 by terraform but can't find the ami
I am making cloud9 by terraform according to the article here
However this code shows the error like this
│ Error: Your query returned no results. Please change your search criteria and try again.
│
│...
1
vote
1
answer
87
views
AWS Elastic Beanstalk.InvalidParameterValue [closed]
I modified my Terraform Repository
several times in order to Deploy an AWS ElasticBeanstalk on my Free Tier AWS Account, but without success.
The API error seen on Terraform is always the same :
"...
0
votes
1
answer
66
views
Terraform lambda runtime management config: Fetch ALL lambda's ARN's
Hi I am working on something very simple
I am creating a lambda runtime management config to manage all my lambda. I have around 9 existing ones.
resource "aws_lambda_runtime_management_config&...
-3
votes
1
answer
74
views
AssumeRoleWithWebIdentity - Call AWS DynamoDB from firebase function using IdentityToken
I am getting this error when calling AssumeRoleWithWebIdentityCommand from a firebase function.
Error: {
Type: 'Sender',
Code: 'InvalidIdentityToken',
Message: 'Incorrect token ...
0
votes
2
answers
61
views
Returning values at different layers of a HCL object, with many nested objects
Before one asks why not change the output to be more friendly or uniform, I would if it came down to it but it will take a lot of effort to change across the board for our environment considering its ...
4
votes
3
answers
412
views
Backward and forward compatibility issues with protobufs in Google Pub/Sub
We use protocol buffers both for gRPC server-to-server communication and for publishing messages to Pub/Sub.
Pub/Sub is fairly sensitive to schema changes, not allowing any schema changes that would ...
-1
votes
1
answer
92
views
Creating multiple Topics and Subscriptions for servicebus in Terraform
We have a requirement of creating multiple topics and subscriptions inside each individual topics in one service bus namespace, which I am able to do with the following terraform code.
for_each = for ...
0
votes
0
answers
127
views
Encountering AADB2C90018 error when Azure B2C app registration created with Terraform
I am attempting to use Terraform to create an app registration in Azure B2C. I have previously succeeded in this task by manually using Graph API requests in Postman. This involved:
Create the ...
-3
votes
1
answer
134
views
Why is my variable using the default value instead of the value from locals? [closed]
I'm using Terraform and noticed that one of my variables always falls back to its default value, even though I define a different value in a locals block.
Here’s what I have in variables.tf:
variable &...
0
votes
0
answers
91
views
How to set permissions for AWS automation documents?
I use AWS automation to stop all my machines. The document for automation is set up with Terraform. I want to restrict the usage of the document to my developer group. But I don't know, how to set the ...
-1
votes
1
answer
94
views
Produce an output from a module that using 'this' keyword
I'm trying to produce an output from a terraform child module which creates a number of subnets based on a variable (which is a map of objects).
I create subnets with:
resource "aws_subnet" &...
-3
votes
1
answer
90
views
How to successfully create a static web app using Terraform apply? [closed]
I have a terraform configuration file that defines a azurerm_static_web_app. When I apply this template, the resource is created and I can successfully deploy a SWA; however, the the console seems to ...
-3
votes
1
answer
55
views
Refactoring Nested .replace() Calls with a Reusable Function in Terraform
terraform.tfvars
resource_groups = {
app_ops_rg = {
name = "rg-{environment}-{project}-{regionalias}-{applicationname}-app"
tags = {
module = "Test"
...
0
votes
1
answer
212
views
AWS Bedrock Agent Action Group Creation Fails with Claude 3.5 Sonnet - Tool Name Validation Error [closed]
Problem
I was experiencing repeated failures when creating AWS Bedrock Agent action groups using Claude 3.5 Sonnet as the foundation model. The CloudTrail error indicated an APISchemaException with ...
-1
votes
1
answer
112
views
AWS Lambda times out when trying to access Secrets Manager
I'm trying to retrieve a secret from AWS Secrets Manager using a Lambda function, but I’m encountering a timeout error:
Response:
{
"errorMessage": "2025-07-15T13:55:13.645Z 3***8 ...
-1
votes
1
answer
82
views
Azure DevOps - Variables aren't passed properly to all stages [closed]
I've built an Azure DevOps YAML pipeline to deploy Auth0 configuration using Terraform.
My pipeline retrieves some secrets from an Azure KeyVault on an Preparation init stage :
stages:
- stage: ...
-1
votes
1
answer
55
views
Terraform deployment in localstack with out errors half the config only get deployed [closed]
So Im trying to deploy some terraform configuration into localstack. Im running it inside WSL so linux based, The problem is that for testing now the configuration in terraform creates an S3 bucket ...
0
votes
0
answers
58
views
How to get HCP Terraform User API Token usable with TFE/HCP entities?
According to HCP Terraform API Token docs you should be able to get a User API Token that has all permissions of the User.
I am on HCP Terrafor Standard tier. As my User in my created org, I can go ...
0
votes
1
answer
88
views
Terraform yamldecode Fails When YAML Structure Changes
I have a YAML file structured as follows:
alerts:
la:
la1:
description: "la1"
severity: 1
resource_counter: "004"
enabled: true
ma:
ma1:...
-1
votes
1
answer
34
views
How can I assign unique, sticky, gap-filling subnets to VMs in Terraform without external scripts or manual mapping?
I’m trying to solve a subnet assignment problem in Terraform and want to double-check if there’s a way to meet all my requirements using only Terraform (no external scripts or manual mapping).
In ...
-4
votes
1
answer
132
views
Deploying databricks with metastore / unity catalog in terraform [closed]
I'm attempting to use terraform to deploy a databricks workspace using unity catalog on a completely databricks free empty environment.
In order to use unity catalog, I need to create a metadata store ...
1
vote
0
answers
68
views
required_providers.tf file code in terraform module interferes with required_providers of terragrunt.hcl
My mongo db module contains the following section
terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas",
version = "1.8.0"
}
}
}...
-1
votes
2
answers
84
views
Terraform do null resources work with depends_on [closed]
I am looking to use the count attribute on a resource to handle some conditionals in terraform. I know that, if count = 0 in a resource, it is null in terraform. What I want to know if that null ...
0
votes
1
answer
95
views
List or search local values used by a Terraform module
I have a Terraform module that has local values spread around the files and sometimes they refer to each other or set values based on other data. Think files like:
main.tf
locals {
...
0
votes
0
answers
40
views
FortiManager error installing packages with terraform
I am currently trying to see the limits of Terraform in deploying configuration in FortiManager and Fortigates.
My goal is to beable to implement a webfilter on policies and install those policies and ...
0
votes
0
answers
65
views
How to get serial console output from AWS ec2 with terraform
How can the EC2 serial console output be logged, to capture the initial setup of EC2?
AWS cli supports get-console-output, but I cannot find any documentation about AWS terraform provider to do so.
-2
votes
1
answer
90
views
How to automate adding kafka acls using aws cli or terraform? [closed]
I am using terraform to create AWS MSK cluster, is it possible to define kafka acls at terraform level or can we use aws cli to add them once cluster is up?
I want to automate this and don't want ...
-1
votes
1
answer
42
views
How to use Terraform for_each on map(object(list)?
I'm working on adding a IAM policy, but my terraform code fails with the below error because some attributes are determined only after an apply, I don't want to run multiple apply commands, How can I ...
-4
votes
1
answer
151
views
ECS Task definition CPU setting for terraform
I have this error, it shows the error CPU is not correct
Error: creating ECS Task Definition (wb_td): ClientException: Invalid 'cpu' setting for task.
with this source below.
resource "...
0
votes
2
answers
137
views
Unable to create Storage Sync Cloud Endpoint (MgmtStorageAccountAuthorizationFailed), even though account has Owner role assigned
When trying to create a Storage Sync Cloud Endpoint, I am getting error code MgmtStorageAccountAuthorizationFailed. The account being used to run the TF code & the Storage Sync Service both have ...