Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save arun9theja/0b8f5f16adcd6bb60efecc8f1ecc63b2 to your computer and use it in GitHub Desktop.

Select an option

Save arun9theja/0b8f5f16adcd6bb60efecc8f1ecc63b2 to your computer and use it in GitHub Desktop.
Terraform Tutorials: Named Values – Filesystem and workspace info
provider "aws" {
region = "us-east-1"
}
locals {
# Define the path to the directory containing your Terraform files
base_dir = path.root
}
resource "aws_s3_bucket" "example_bucket" {
bucket = "example-bucket-${local.base_dir}"
acl = "private"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment