Skip to content

Instantly share code, notes, and snippets.

@devops-school
Created March 31, 2023 05:14
Show Gist options
  • Save devops-school/31aa7cb77bb6a3be05b78dc5fe55c0d1 to your computer and use it in GitHub Desktop.
Save devops-school/31aa7cb77bb6a3be05b78dc5fe55c0d1 to your computer and use it in GitHub Desktop.

Revisions

  1. devops-school created this gist Mar 31, 2023.
    13 changes: 13 additions & 0 deletions terraform-path-root.tf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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"
    }