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

Panic: runtime error: invalid memory address or nil pointer dereference

Hi there, Our team has recently adopted Terraform Cloud. In addition to managing infrastructure with TC, we’re trying to also manage TC with TC. To do this, we have a workspace for TC management. We...

View Article


Accessing variables declared and defined in parent from child module

Hi, I am quite new in using Terraform, please bear with me if my questions are silly. My code structure is as follows: Root:----------- main.tf variables.tf main_values.tfvars nva-------(/* child...

View Article


Terraform with github action aws MFA issue

How to work with github actions to create MFA token for aws. Need to run this shell scipt to get the toke. unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN export...

View Article

Is it supported for per-module state file?

I have several modules shared by different project, e.g. projectA/main.tf and projectB/main.tf, written by terraform like below module “moduelA” { source = “./modules/moduelA” } I have set the remote...

View Article

Image may be NSFW.
Clik here to view.

Determine list of module dependencies

Is there a canonical way to determine what modules a given workspace depends on? We’re currently looking at .terraform/modules/modules.json, but found that it does not seem to “clean up” over time...

View Article


Image may be NSFW.
Clik here to view.

Any way to Fetch computed value

Hello, For Azure, Private Endpoint resource , private_ip_address is a computed value. For Private DNS A Record , only IP address is allowed. Is there a way that I can fetch the computed...

View Article

Terraform apply command destroys my newly imported resources

I’m using terraform to deploy infrastructure in Oracle Cloud (OCI) and I have some resources such as virtual machines that were deployed manually. I created the below terraform script to import a VM...

View Article

AWS AppSync - can we fetch the schema from S3?

The aws_appsync_graphql_api resource for AWS AppSync has a schema attribute for the GraphQL schema, that can be either multi-line heredoc or loaded via a file function. I’m currently using a file...

View Article


Terraform apply fails to create ec2 instances. it is complaining about the...

here is the code: esource “aws_instance” “PublicEC2” { ami = “mi-0e9089763828757e1” instance_type = “t2.micro” vpc_security_group_ids = “{aws_security_group.allow_ssh.id}" subnet_id =...

View Article


Terraform Plan Auto Apply Risks

We need to provision multiple sets of predefined AWS infrastructure components. The set of components is fixed, and defined by a database of properties e.g. the properties may include a Swagger file...

View Article

Specifying different providers in a resource using "for_each"

I’m trying to create a postgres user management configuration, and I’ve got several independent postgres instances across which to manage users. I’d like to be able to have a single module for the...

View Article

Accessing output of child module that is enabled/disabled using count

Terraform verison: 0.12.24 AzureRm: 2.0.0 I am using “count” to enable/disable child module. When i am trying to feed the output of child module to the parent module, i am running into issues. Child...

View Article

Image may be NSFW.
Clik here to view.

Partial Terraform

Once in a while I discover an interesting setting in the resources I manage, such as and I want to track only this setting. Sometimes even without prior state - restoring the state directly from the...

View Article


Image may be NSFW.
Clik here to view.

How can i Use the Team token to automate plan/apply via CI

Hi, Using terraform cloud, how can i use the team token for authenticate on our account with our CI process? Currently, i tried to add the contents of /home/tclaro/.terraform.d/credentials.tfrc.json...

View Article

Create multiple rules in AWS security Group

Hi, I tried to create an AWS security group with multiple inbound rules, Normally we need to multiple ingresses in the sg for multiple inbound rules. Instead of creating multiple ingress rules...

View Article


Is there a tfe_organization datasource or similar?

I’m trying to access the current organization’s name in Terraform Cloud to use in terraform_remote_state blocks for accessing outputs from other workspaces - is there a way to get the “current”...

View Article

Vnet and Subnet creation using terrafrom is not working

Terraform v0.12.26 provider.azuread v0.10.0 provider.azurerm v2.15.0 provider.external v1.2.0 provider.helm v0.10.5 provider.kubernetes v1.11.3 provider.local v1.4.0 provider.null v2.1.2...

View Article


0.12upgrade messing up with code logic and functionality

Hello! We are migrating our infrastructure to terraform 0.12 from 0.11. Using 0.12upgrade integrated tool for this. It is well documented and is doing it’s job well. But on one of the layers, I faced...

View Article

VPC Peering problem cross account

Hi, I have an existing VPC peer between AWS Account 1 and AWS Account 2 which was created manually. I am now trying to do the same via Terraform between the same accounts but the result seems to put...

View Article

Terraform import azurerm_virtual_machine.XXXX

Hi all, I’ve been working on importing Azure resources and I was able to do so far no problem… azurerm_resource_group, azurerm_virtual_network, azurerm_subnet, azurerm_network_interface and now I try...

View Article
Browsing all 11529 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>