In terraform, if the following local values/variables are setup in your *.tf file:
locals {
default_name_prefix = "${var.project_name}-web"
name_prefix = "something"
}
How do you access these values in the rest of your *.tf config file, for example finish this code snippet:
resource "aws_s3_bucket" "files" {
bucket = "[...OCCULSION IS HERE...]-files"
# ...
}
resource "aws_s3_bucket" "files" {
bucket = "${local.name_prefix}-files"
# ...
}
^^ note the use of the "local" keyword
^^^ note the outer double quote enclosure to denote string value
^^^^ note the inner ${} enclosure to denote derived value.
In terraform, if the following local values/variables are setup in your *.tf file:
locals {
default_name_prefix = "${var.project_name}-web"
name_prefix = "something"
}
How do you access these values in the rest of your *.tf config file, for example finish this code snippet:
resource "aws_s3_bucket" "files" {
bucket = "[...OCCULSION IS HERE...]-files"
# ...
}
In terraform, if the following local values/variables are setup in your *.tf file:
locals {
default_name_prefix = "${var.project_name}-web"
name_prefix = "something"
}
How do you access these values in the rest of your *.tf config file, for example finish this code snippet:
resource "aws_s3_bucket" "files" {
bucket = "[...OCCULSION IS HERE...]-files"
# ...
}
resource "aws_s3_bucket" "files" {
bucket = "${local.name_prefix}-files"
# ...
}
^^ note the use of the "local" keyword
^^^ note the outer double quote enclosure to denote string value
^^^^ note the inner ${} enclosure to denote derived value.
status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|
repetition number in this series | 0 | memorised on | scheduled repetition | ||||
scheduled repetition interval | last repetition or drill |