Skip to content

Commit

Permalink
Merge pull request #64 from shlomimatichin/invalid_tf_files_in_subfol…
Browse files Browse the repository at this point in the history
…ders

invalid tf files in subfolders
  • Loading branch information
yaronya committed Oct 21, 2020
2 parents cace701 + 3353c0f commit d0b9eaa
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/terraform.go
Expand Up @@ -52,7 +52,7 @@ func IsTerraformInitRun(dir string) bool {
}

func GetTerraformFilePaths(rootDir string) []string {
const tfFileMatcher = "/**/*.tf"
const tfFileMatcher = "/*.tf"

tfFiles, err := doublestar.Glob(rootDir + tfFileMatcher)
errors.PanicOnError(err, nil)
Expand Down
@@ -0,0 +1 @@
a b c d e f g
@@ -0,0 +1,23 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

resource "aws_s3_bucket" "b" {
bucket = "my-tf-test-bucket"
acl = "private"

tags = merge( map("Name","Mybucket"), local.terratag_added_main)
}
locals {
terratag_added_main = {"env0_environment_id"="40907eff-cf7c-419a-8694-e1c6bf1d1168","env0_project_id"="43fd4ff1-8d37-4d9d-ac97-295bd850bf94"}
}

@@ -0,0 +1,21 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

resource "aws_s3_bucket" "b" {
bucket = "my-tf-test-bucket"
acl = "private"

tags {
Name = "My bucket"
}
}
@@ -0,0 +1 @@
a b c d e f g
@@ -0,0 +1,21 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

resource "aws_s3_bucket" "b" {
bucket = "my-tf-test-bucket"
acl = "private"

tags {
Name = "My bucket"
}
}

0 comments on commit d0b9eaa

Please sign in to comment.