Questions tagged [hcl]

HashiCorp Configuration Language. The structured configuration syntax that serves as the basis for Terraform's configuration language.

HCL establishes the syntax Terraform uses for things like arguments, blocks, literal values, and expressions. But what most people think of as the Terraform language extends beyond just the syntax; the built-in functions, Terraform-specific block types (like resource and variable), and Terraform-specific named values available in expressions are all implementation details of Terraform itself.

Source: https://www.terraform.io/docs/glossary.html#hcl

291 questions
2
votes
0 answers

How can a Nomad job template use a default string for a node's missing metadata key?

I'd like to use a template in a Nomad job that has a string value that can be optionally overridden on a node basis, something like this: job "foldingathome" { ... meta { foldingathome_power = coalesce(meta.foldingathome_power, "medium") } …
hufman
  • 163
  • 1
  • 2
  • 6
2
votes
3 answers

Create a set from a list of sets

I am trying to create a predefined set of IAM roles. locals { default_iam_roles = { group1 = { name = "group:group1-group@mydomain.com" roles = toset([ "roles/viewer" ]) } …
Luiscri
  • 913
  • 1
  • 13
  • 40
2
votes
2 answers

conditional module creation terraform

I have the following main.tf module "vpc" { source = "registry.terraform.io/terraform-aws-modules/vpc/aws" version = "~> 3.14.0" name = var.environment cidr = var.vpc_cidr azs = var.az private_subnets = var.private_subnets …
winter
  • 2,687
  • 4
  • 18
  • 27
2
votes
1 answer

Is it possible to recover from an error returned by a data source?

Let's take the dns_a_record_set data source, for example, if one does: data "dns_a_record_set" "test" { ## Purposely passing a DNS that would not resolve host = "thisDnsDoesNotResolve.org" } output "test" { value =…
β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
2
votes
1 answer

how to get terragrunt to read tfvars files into dependent modules

Anyone know how to get terragrunt to read tfvars files into dependent modules? If I declare all my tfvars as inputs in my root terragrunt.hcl, everything works fine, but of course then I can’t customize them by environment. I tried adding the…
williamcodes
  • 6,317
  • 8
  • 32
  • 55
2
votes
1 answer

Terraform Conditionals in AWS Module

Earlier today I was looking at https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/v2.77.0/main.tf to look deeper into how the VPC module for AWS works behind the scenes. One thing that I am struggling with is the count conditional such…
2
votes
3 answers

Jenkinsfile print parameters nicely

We have a Jenkinsfile with parameters declared as follows: def params = [string(name: 'ENVIRONMENT', value: environment), string(name: 'VERSION', value: version), string(name: 'REGION', value: region)] I'd like…
user1016765
  • 2,935
  • 2
  • 32
  • 48
2
votes
2 answers

parse simple terraform file using go

I now tried, everything but cant get this simple thing to work. I got the following test_file.hcl: variable "value" { test = "ok" } I want to parse it using the following code: package hcl import ( …
JMAD2016
  • 111
  • 1
  • 2
  • 9
2
votes
1 answer

Multiple Define Error in XPages CKEditor since Domino Version 10

We're using XPages since a couple of years for 3 business applications we developped for a customer. CKEditor is playing a strategic role for one of the applications and we customized toolbar and skin. Since V10 of Domino we get a "mutlipleDefine"…
2
votes
1 answer

How do I use one provisioner for multiple Packer builds in an HCL-formatted template?

I'm using Packer to provision a VM for my project's CI pipeline, which is hosted on a supported cloud provider. My provisioning scripts are a little complicated, so I need to iterate on them carefully to get them right. To save money I'm using a…
JesseTG
  • 2,025
  • 1
  • 24
  • 48
2
votes
1 answer

Vault: enabling unauthenticated "public" resources

I am creating a transit RSA key for signing JWTs and would like to make this policy available to any caller who can connect to the vault instance, without authentication (assuming TLS is already working on all clients, that is). path…
yurisich
  • 6,991
  • 7
  • 42
  • 63
2
votes
1 answer

golang viper & hcl config file issues

I've written a simple go program using viper to read in a config file. package main import ( "fmt" "log" "github.com/spf13/viper" ) func main() { viper.SetConfigType("hcl") // # first used file …
thetango
  • 41
  • 3
2
votes
1 answer

Domino AppDev Pack TypeError: database.useAgent is not a function

I am using the AppDev Pack to create an API for a domino database. Currently trying only the sample code present in the Domino AppDev Pack. Here is the code: app.get("/lastUpdated", (req, res, next) => { //const operationName =…
2
votes
2 answers

how to create a Terraform for_each loop for number of virtual machines in Azure availability set

We could create multiple azure vms in a availability set using "count" loop. How can we create the same using "for_each" loop where the hostname and network interfaceid will be dynamic and looped over. (in terrraform > 0.12.6) resource…
2
votes
1 answer

How to initialize list in Terraform?

I want to create a variable that has a single value, a list of elements. So I did: variable "cipher_suites" = {  type    = list(string)    default =  [ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", …
Yoda
  • 17,363
  • 67
  • 204
  • 344