Quantcast
Channel: Terraform - HashiCorp Discuss
Browsing all 11533 articles
Browse latest View live

Exclude part of dynamic block if specific env variable is set. Or need advice...

Hello everyone, I need some help. I want to reuse same manifest to provision azurerm_application_gateway and use dynamic blocks for some parts of this resource for example for http_listener. Content...

View Article


Terraform autocompletion not working on macOS with default zsh shell

Hi Everyone I’m having trouble enabling autocompletion on a fresh MacOS terraform install. At first running the command terraform -install-autocomplete would return: Error executing CLI: Did not find...

View Article


Hash table in terraform

Hello, Is-it possible to create an hash table containing an array in terraform ? hash[“apache”] = [‘80’,‘443’] Thanks. 1 post - 1 participant Read full topic

View Article

Ignore resource drift during terraform apply

I have a use case to create few aws resources once and ignore any drift in future deployments. Appreciate your help. 1 post - 1 participant Read full topic

View Article

Image may be NSFW.
Clik here to view.

Multi-line Variable problem

Hi, I am confused The documentation states “The text fields for variable values can handle multi-line text (typed or pasted) without any special effort.” But I run into a error message “Value cannot...

View Article


New Guide: Terraform import

Good news, everyone! We’ve recently published a guide to using Terraform import on HashiCorp Learn. Once users learn to create and manage infrastructure with Terraform, one of the most common requests...

View Article

Azurerm_managed_disk - Disk Encryption Set must have the Reader Role Assignment

On the azurerm_managed_disk documentation page there is the below note: NOTE: The Disk Encryption Set must have the Reader Role Assignment scoped on the Key Vault - in addition to an Access Policy to...

View Article

Terraform create a file

Hello All, I am new to using terraform and working on building a new EC2 instance. I was able to deploy the EC2 instance but need to do some post configuration steps which I am planning on doing using...

View Article


Copy vault secrets from one vault to another vault

I would like to copy secrets from path “secrets/platform” in vault setup to the path “secrets/browse” in another vault setup…would you tell me how to do this using terraform(we have a repo with...

View Article


It is correst syntax?

Hello, I need declare resource, but I don’t know if it correct resource "xxx" "yyy" { storage { disks = [ { scsi = "", selected = 1, }, ] nics = [ { mac = "", type = 1, }, { mac = "", type = 0, }, ]...

View Article

Access autoscaling_groups name attribute on aws_eks_node_group resource

Attribute seems to be nested in a list of lists, but I can’t get to the actual name value of the autoscaling_group. Tested in Output and I can get to the resources atttribute, but can’t seem to drill...

View Article

What is the minimum hardware requirements for Terraform OSS?

I’m facing an issue while running terraform plan. The DEBUG log says fatal error: runtime: out of memory. The total memory is 1GB and the free memory is below 100MB. Does terraform still runs with it?...

View Article

Adding trigger between lambda function and Cloudwatch rule?

I am struggling to create a schedule to run a lambda function through terraform… With the code below resource "aws_lambda_function" "cleansing_coding_lambda" { ... } resource...

View Article


Default Behaviour of Map Variables

Hi Team, I ran in to this problem and perhaps someone could help out here. I have object type variables ( eg . test_roles) which is used in a module, at times when the module is called the variable...

View Article

Assign data source values in variables

Hi, good morning. I’m using the data source “aws_instances” to get all instances I have created and trying to store them in a variable, but it’s not working. Can I really do that or it’s not possible...

View Article


Migrating format for resource id

I ran into an interesting issue with the UltraDNS provider when attempting to implement a resource import func. The composite resource id, OwnerName.Name, uses a period to separate the constituent...

View Article

Quoting types and identifiers

Working on a configuration recently, I created a resource but forgot to quote the type and name. Eg instead of: resource "null_resource" "my_resource" { ... } I typed: resource null_resource...

View Article


Using for_each inside Data Source (aws_instance and aws_instances)

Hi, In the Terraform documentation I found a data source called aws_ebs_volumes and in the example they use aws_ebs_volume data source too (code below) `data "aws_ebs_volumes" "example" { tags = {...

View Article

How to overcome aws credential session timeout when storing tfstate in s3

Configuring terraform state backend using s3 I am using in-house custom provider and storing tfstate in aws s3. so basically I need the aws creds to be live for the start and end of the terraform...

View Article

Adding a module in Terraform Cloud

I am trying to add a module in Terraform cloud free tier. Following the documentation I have created a repository for my module in GitLab, but when I am publishing my private module it is throwing an...

View Article
Browsing all 11533 articles
Browse latest View live