From ffbfc9c166d0d2edd7cb9932567ca7c7dc08e4dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 22:51:14 -0500 Subject: [PATCH] chore: Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 (#672) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.8.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.7.1&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 4 +- go.sum | 7 +- testdata/v2_no_aws_provider_yaml/Makefile | 6 +- .../terraform/accounts/bar/Makefile | 20 ++ .../terraform/accounts/bar/README.md | 0 .../terraform/accounts/bar/fogg.tf | 158 +++++++++++++++ .../terraform/accounts/bar/main.tf | 0 .../terraform/accounts/bar/outputs.tf | 0 .../terraform/accounts/bar/terraform.d | 1 + .../terraform/accounts/bar/variables.tf | 0 .../terraform/accounts/foo/Makefile | 20 ++ .../terraform/accounts/foo/README.md | 0 .../terraform/accounts/foo/fogg.tf | 158 +++++++++++++++ .../terraform/accounts/foo/main.tf | 0 .../terraform/accounts/foo/outputs.tf | 0 .../terraform/accounts/foo/terraform.d | 1 + .../terraform/accounts/foo/variables.tf | 0 .../terraform/envs/prod/Makefile | 51 +++++ .../terraform/envs/prod/README.md | 0 .../terraform/envs/staging/Makefile | 2 +- .../terraform/envs/staging/comp1/Makefile | 20 ++ .../terraform/envs/staging/comp1/README.md | 0 .../terraform/envs/staging/comp1/fogg.tf | 182 ++++++++++++++++++ .../terraform/envs/staging/comp1/main.tf | 0 .../terraform/envs/staging/comp1/outputs.tf | 0 .../terraform/envs/staging/comp1/terraform.d | 1 + .../terraform/envs/staging/comp1/variables.tf | 0 .../terraform/envs/staging/comp2/Makefile | 20 ++ .../terraform/envs/staging/comp2/README.md | 0 .../terraform/envs/staging/comp2/fogg.tf | 182 ++++++++++++++++++ .../terraform/envs/staging/comp2/main.tf | 0 .../terraform/envs/staging/comp2/outputs.tf | 0 .../terraform/envs/staging/comp2/terraform.d | 1 + .../terraform/envs/staging/comp2/variables.tf | 0 .../terraform/envs/staging/vpc/fogg.tf | 56 ++++++ .../terraform/modules/my_module/Makefile | 12 ++ .../terraform/modules/my_module/README.md | 2 + .../terraform/modules/my_module/fogg.tf | 2 + .../terraform/modules/my_module/main.tf | 0 .../terraform/modules/my_module/outputs.tf | 0 .../terraform/modules/my_module/variables.tf | 0 41 files changed, 898 insertions(+), 8 deletions(-) create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/main.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/outputs.tf create mode 120000 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/variables.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/main.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/outputs.tf create mode 120000 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/variables.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/prod/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/main.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/outputs.tf create mode 120000 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/variables.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/main.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/outputs.tf create mode 120000 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/variables.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/main.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/outputs.tf create mode 100644 testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/variables.tf diff --git a/go.mod b/go.mod index 32bb47dfe..d2b60bbb5 100644 --- a/go.mod +++ b/go.mod @@ -31,10 +31,10 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/spf13/afero v1.2.2 github.com/spf13/cobra v1.5.0 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 gopkg.in/go-playground/validator.v9 v9.31.0 gopkg.in/ini.v1 v1.66.6 - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 + gopkg.in/yaml.v3 v3.0.1 ) require ( diff --git a/go.sum b/go.sum index f31745f36..1f231d3f0 100644 --- a/go.sum +++ b/go.sum @@ -740,6 +740,7 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -748,8 +749,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk= @@ -1216,8 +1218,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/testdata/v2_no_aws_provider_yaml/Makefile b/testdata/v2_no_aws_provider_yaml/Makefile index a74f2023b..efdb7b355 100644 --- a/testdata/v2_no_aws_provider_yaml/Makefile +++ b/testdata/v2_no_aws_provider_yaml/Makefile @@ -3,9 +3,9 @@ include scripts/common.mk -ENVS=staging -MODULES= -ACCOUNTS= +ENVS=prod staging +MODULES=my_module +ACCOUNTS=bar foo all: check diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile new file mode 100644 index 000000000..d30df536c --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile @@ -0,0 +1,20 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + + +export TERRAFORM_VERSION := 0.100.0 +export TFLINT_ENABLED := 0 +export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache +export TF_BACKEND_KIND := s3 + +export AWS_BACKEND_PROFILE := profile + + + +include ../../..//scripts/component.mk + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help + diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/README.md b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf new file mode 100644 index 000000000..0ec6c7ad6 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf @@ -0,0 +1,158 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. +terraform { + required_version = "=0.100.0" + + backend "s3" { + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + encrypt = true + region = "us-west-2" + profile = "profile" + + + } + required_providers { + + archive = { + source = "hashicorp/archive" + + version = "~> 2.0" + + } + + assert = { + source = "bwoznicki/assert" + + version = "~> 0.0.1" + + } + + local = { + source = "hashicorp/local" + + version = "~> 2.0" + + } + + null = { + source = "hashicorp/null" + + version = "~> 3.0" + + } + + okta-head = { + source = "okta/okta" + + version = "~> 3.30" + + } + + random = { + source = "hashicorp/random" + + version = "~> 2.2" + + } + + template = { + source = "hashicorp/template" + + version = "~> 2.2" + + } + + tls = { + source = "hashicorp/tls" + + version = "~> 3.0" + + } + + } +} +variable "env" { + type = string + default = "accounts" +} +variable "project" { + type = string + default = "proj" +} +variable "component" { + type = string + default = "bar" +} +variable "account" { + type = string + default = "bar" +} +variable "owner" { + type = string + default = "foo@example.com" +} +variable "tags" { + type = object({ project : string, env : string, service : string, owner : string, managedBy : string }) + default = { + project = "proj" + env = "accounts" + service = "bar" + owner = "foo@example.com" + managedBy = "terraform" + } +} +variable "foo" { + type = string + default = "bar1" +} +data "terraform_remote_state" "global" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/global.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "bar" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "foo" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +variable "aws_accounts" { + type = map(string) + default = { + + } +} diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/outputs.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d new file mode 120000 index 000000000..29617d288 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d @@ -0,0 +1 @@ +../../../terraform.d \ No newline at end of file diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/variables.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile new file mode 100644 index 000000000..d30df536c --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile @@ -0,0 +1,20 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + + +export TERRAFORM_VERSION := 0.100.0 +export TFLINT_ENABLED := 0 +export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache +export TF_BACKEND_KIND := s3 + +export AWS_BACKEND_PROFILE := profile + + + +include ../../..//scripts/component.mk + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help + diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/README.md b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf new file mode 100644 index 000000000..60489edd4 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf @@ -0,0 +1,158 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. +terraform { + required_version = "=0.100.0" + + backend "s3" { + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + encrypt = true + region = "us-west-2" + profile = "profile" + + + } + required_providers { + + archive = { + source = "hashicorp/archive" + + version = "~> 2.0" + + } + + assert = { + source = "bwoznicki/assert" + + version = "~> 0.0.1" + + } + + local = { + source = "hashicorp/local" + + version = "~> 2.0" + + } + + null = { + source = "hashicorp/null" + + version = "~> 3.0" + + } + + okta-head = { + source = "okta/okta" + + version = "~> 3.30" + + } + + random = { + source = "hashicorp/random" + + version = "~> 2.2" + + } + + template = { + source = "hashicorp/template" + + version = "~> 2.2" + + } + + tls = { + source = "hashicorp/tls" + + version = "~> 3.0" + + } + + } +} +variable "env" { + type = string + default = "accounts" +} +variable "project" { + type = string + default = "proj" +} +variable "component" { + type = string + default = "foo" +} +variable "account" { + type = string + default = "foo" +} +variable "owner" { + type = string + default = "foo@example.com" +} +variable "tags" { + type = object({ project : string, env : string, service : string, owner : string, managedBy : string }) + default = { + project = "proj" + env = "accounts" + service = "foo" + owner = "foo@example.com" + managedBy = "terraform" + } +} +variable "foo" { + type = string + default = "bar1" +} +data "terraform_remote_state" "global" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/global.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "bar" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "foo" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +variable "aws_accounts" { + type = map(string) + default = { + + } +} diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/outputs.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d new file mode 120000 index 000000000..29617d288 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d @@ -0,0 +1 @@ +../../../terraform.d \ No newline at end of file diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/variables.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile new file mode 100644 index 000000000..341a07dcc --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile @@ -0,0 +1,51 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + +COMPONENTS= + +all: +.PHONY: all + +lint: ## lint all components in the env + @for c in $(COMPONENTS); do \ + echo $$c; \ + $(MAKE) -C $$c lint || exit $$? ; \ + done +.PHONY: lint + +fmt: ## format terraform code in all components in this env + @for c in $(COMPONENTS); do \ + echo $$c; \ + $(MAKE) -C $$c fmt || exit $$? ; \ + done +.PHONY: fmt + +check-plan: ## check all plans in this environment + @for c in $(COMPONENTS); do \ + echo $$c; \ + $(MAKE) -C $$c check-plan || exit $$? ; \ + done +.PHONY: check-plan + +docs: ## generate docs for all components in this env + @for c in $(COMPONENTS); do \ + echo $$c; \ + $(MAKE) -C $$c docs || exit $$? ; \ + done +.PHONY: docs + +clean: ## clean all components in this env + @for c in $(COMPONENTS); do \ + echo $$c; \ + $(MAKE) -C $$c clean || exit $$? ; \ + done +.PHONY: clean + +test: +.PHONY: test + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help + diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile index 0e0e5b9a5..9fb1403e0 100644 --- a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile @@ -1,7 +1,7 @@ # Auto-generated by fogg. Do not edit # Make improvements in fogg, so that everyone can benefit. -COMPONENTS=vpc +COMPONENTS=comp1 comp2 vpc all: .PHONY: all diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile new file mode 100644 index 000000000..ae0dfece8 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile @@ -0,0 +1,20 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + + +export TERRAFORM_VERSION := 0.100.0 +export TFLINT_ENABLED := 0 +export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache +export TF_BACKEND_KIND := s3 + +export AWS_BACKEND_PROFILE := profile + + + +include ../../../..//scripts/component.mk + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help + diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf new file mode 100644 index 000000000..e7755b7dd --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf @@ -0,0 +1,182 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. +terraform { + required_version = "=0.100.0" + + backend "s3" { + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp1.tfstate" + encrypt = true + region = "us-west-2" + profile = "profile" + + + } + required_providers { + + archive = { + source = "hashicorp/archive" + + version = "~> 2.0" + + } + + assert = { + source = "bwoznicki/assert" + + version = "~> 0.0.1" + + } + + local = { + source = "hashicorp/local" + + version = "~> 2.0" + + } + + null = { + source = "hashicorp/null" + + version = "~> 3.0" + + } + + okta-head = { + source = "okta/okta" + + version = "~> 3.30" + + } + + random = { + source = "hashicorp/random" + + version = "~> 2.2" + + } + + template = { + source = "hashicorp/template" + + version = "~> 2.2" + + } + + tls = { + source = "hashicorp/tls" + + version = "~> 3.0" + + } + + } +} +variable "env" { + type = string + default = "staging" +} +variable "project" { + type = string + default = "proj" +} +variable "component" { + type = string + default = "comp1" +} +variable "owner" { + type = string + default = "foo@example.com" +} +variable "tags" { + type = object({ project : string, env : string, service : string, owner : string, managedBy : string }) + default = { + project = "proj" + env = "staging" + service = "comp1" + owner = "foo@example.com" + managedBy = "terraform" + } +} +variable "foo" { + type = string + default = "bar2" +} +data "terraform_remote_state" "global" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/global.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "comp2" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp2.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "vpc" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/vpc.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "bar" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "foo" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +variable "aws_accounts" { + type = map(string) + default = { + + } +} diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/outputs.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d new file mode 120000 index 000000000..b482d75bb --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d @@ -0,0 +1 @@ +../../../../terraform.d \ No newline at end of file diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/variables.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile new file mode 100644 index 000000000..ae0dfece8 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile @@ -0,0 +1,20 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + + +export TERRAFORM_VERSION := 0.100.0 +export TFLINT_ENABLED := 0 +export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache +export TF_BACKEND_KIND := s3 + +export AWS_BACKEND_PROFILE := profile + + + +include ../../../..//scripts/component.mk + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help + diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf new file mode 100644 index 000000000..f1d8e28c8 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf @@ -0,0 +1,182 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. +terraform { + required_version = "=0.100.0" + + backend "s3" { + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp2.tfstate" + encrypt = true + region = "us-west-2" + profile = "profile" + + + } + required_providers { + + archive = { + source = "hashicorp/archive" + + version = "~> 2.0" + + } + + assert = { + source = "bwoznicki/assert" + + version = "~> 0.0.1" + + } + + local = { + source = "hashicorp/local" + + version = "~> 2.0" + + } + + null = { + source = "hashicorp/null" + + version = "~> 3.0" + + } + + okta-head = { + source = "okta/okta" + + version = "~> 3.30" + + } + + random = { + source = "hashicorp/random" + + version = "~> 2.2" + + } + + template = { + source = "hashicorp/template" + + version = "~> 2.2" + + } + + tls = { + source = "hashicorp/tls" + + version = "~> 3.0" + + } + + } +} +variable "env" { + type = string + default = "staging" +} +variable "project" { + type = string + default = "proj" +} +variable "component" { + type = string + default = "comp2" +} +variable "owner" { + type = string + default = "foo@example.com" +} +variable "tags" { + type = object({ project : string, env : string, service : string, owner : string, managedBy : string }) + default = { + project = "proj" + env = "staging" + service = "comp2" + owner = "foo@example.com" + managedBy = "terraform" + } +} +variable "foo" { + type = string + default = "bar2" +} +data "terraform_remote_state" "global" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/global.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "comp1" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp1.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "vpc" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/vpc.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "bar" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "foo" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +variable "aws_accounts" { + type = map(string) + default = { + + } +} diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/outputs.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d new file mode 120000 index 000000000..b482d75bb --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d @@ -0,0 +1 @@ +../../../../terraform.d \ No newline at end of file diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/variables.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf index 470a96b14..689031fc1 100644 --- a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf +++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf @@ -116,6 +116,62 @@ data "terraform_remote_state" "global" { profile = "profile" + } +} +data "terraform_remote_state" "comp1" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp1.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "comp2" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/envs/staging/components/comp2.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "bar" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/bar.tfstate" + region = "us-west-2" + profile = "profile" + + + } +} +data "terraform_remote_state" "foo" { + backend = "s3" + config = { + + + bucket = "buck" + + key = "terraform/proj/accounts/foo.tfstate" + region = "us-west-2" + profile = "profile" + + } } variable "aws_accounts" { diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile new file mode 100644 index 000000000..082710627 --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile @@ -0,0 +1,12 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. + +export TERRAFORM_VERSION := 0.100.0 +export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache + +include ../../..//scripts/module.mk + + +help: ## display help for this makefile + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: help diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md new file mode 100644 index 000000000..fce2ac06f --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf new file mode 100644 index 000000000..8c7ad42aa --- /dev/null +++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf @@ -0,0 +1,2 @@ +# Auto-generated by fogg. Do not edit +# Make improvements in fogg, so that everyone can benefit. diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/outputs.tf new file mode 100644 index 000000000..e69de29bb diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/variables.tf new file mode 100644 index 000000000..e69de29bb