generated from terraform-modules/template_aws_submodules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
252 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # .tf-control | ||
| # allows for setting a specific command to be used for tf-* commands under this git repo | ||
| # see tf-control.sh help for more info | ||
|
|
||
| TFCONTROL_VERSION="1.0.7" | ||
| #TFCOMMAND="terraform_latest" | ||
| TFCOMMAND="terraform_current" | ||
|
|
||
| # TF_CLI_CONFIG_FILE=PATH-TO-FILE/.tf-control.tfrc | ||
| # TFARGS="" | ||
| # TFNOLOG="" | ||
| # TFNOCOLOR="" | ||
|
|
||
| # from issue: https://github.com/hashicorp/terraform/issues/32901 | ||
| # to get to TF 1.4 and beyond in a shared cache environment | ||
| # this is currently in the tf-control.sh script explicitly | ||
| #TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE=1 | ||
|
|
||
| # use the following to force a specific version. An upgrade of an existing 0.12.31 to 1.x | ||
| # needs you to cycle through 0.13.17, 0.14.11, and then latest (0.15.5 not needed). Other | ||
| # steps in between. See https://github.e.it.census.gov/terraform/support/tree/master/docs/how-to/terraform-upgrade for details | ||
| # | ||
| #TFCOMMAND="terraform_0.12.31" | ||
| #TFCOMMAND="terraform_0.13.7" | ||
| #TFCOMMAND="terraform_0.14.11" | ||
| #TFCOMMAND="terraform_0.15.5" | ||
| #TFCOMMAND="terraform_1.3.10" | ||
| #TFCOMMAND="terraform_1.4.7" | ||
| #TFCOMMAND="terraform_1.5.7" | ||
| #TFCOMMAND="terraform_1.6.6" | ||
| #TFCOMMAND="terraform_1.7.5" | ||
| #TFCOMMAND="terraform_1.8.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| TFCONTROL_VERSION="1.0.5" | ||
|
|
||
| # https://www.terraform.io/docs/cli/config/config-file.html | ||
| plugin_cache_dir = "/data/terraform/terraform.d/plugin-cache" | ||
| #disable_checkpoint = true | ||
|
|
||
| provider_installation { | ||
| # filesystem_mirror { | ||
| # path = "/apps/terraform/terraform.d/providers" | ||
| # include = [ "*/*/*" ] | ||
| # } | ||
| filesystem_mirror { | ||
| path = "/data/terraform/terraform.d/providers" | ||
| include = [ "*/*/*" ] | ||
| } | ||
| # filesystem_mirror { | ||
| # path = "/apps/terraform/terraform.d/providers" | ||
| # include = [ "external.terraform.census.gov/*/*" ] | ||
| # } | ||
| direct { | ||
| include = [ "*/*/*" ] | ||
| } | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| locals { | ||
| base_tags = { | ||
| "boc:created_by" = "terraform" | ||
| "boc:tf_module_version" = local._module_version | ||
| "boc:tf_module_name" = format("%v/%v", local._module_name, "base-label") | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| output "version" { | ||
| description = "Module version information. Cannot be passed back in tags because it will overwrite other module tags" | ||
| value = local.base_tags | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| locals { | ||
| _prefixes = yamldecode(file(format("%v/prefixes.yml", path.module)))["prefixes"] | ||
| prefixes = { for k, v in local._prefixes : k => v!=null ? format("%v-", v) : "" } | ||
| } | ||
|
|
||
| output "prefixes" { | ||
| description = "Pre-defined prefixes map. If missing, there is no prefix for the component." | ||
| value = local.prefixes | ||
| } | ||
|
|
||
| # get prefix with: try(module.x.prefixes.s3,"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| prefixes: | ||
| customer-gateway: cgw | ||
| dhcp-options: | ||
| ebs: v-ebs | ||
| ecs: ecs | ||
| ecs-policy: p-ecs | ||
| ecs-role: r-ecs | ||
| ecs-security-group: ecs | ||
| ecs-user: s-ecs | ||
| efs: v-efs | ||
| eks-policy: p-eks | ||
| eks-role: r-eks | ||
| eks-security-group: eks | ||
| eks-user: s-eks | ||
| elastic-ip: eip | ||
| group: g | ||
| iam-admin-user: a | ||
| iam-service-user: s | ||
| iam-user: u | ||
| internet-gateway: igw | ||
| kms: k-kms | ||
| log-group: lg | ||
| log-stream: lgs | ||
| nat-gateway: nat | ||
| network-acl: nacl | ||
| policy: p | ||
| role: r | ||
| route-table: route | ||
| s3: v-s3 | ||
| security-group: | ||
| subnet: | ||
| transit-gateway-attachment: tgwa | ||
| transit-gateway-peer: tgwp | ||
| transit-gateway-route-table: tgwr | ||
| transit-gateway: tgw | ||
| transit-gateway-vpn: tgwv | ||
| vpc: | ||
| vpc-endpoint: vpce | ||
| vpc-peer: vpcp | ||
| vpn-connection: vpn_ | ||
| vpn-gateway: vpcg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| VERSION 2.1.1 | ||
| TAG setup | ||
| REMOTE-STATE | ||
| COMMAND tf-directory-setup.py -l none -f | ||
| COMMAND setup-new-directory.sh | ||
|
|
||
| TAG links | ||
| LINKTOP includes.d/variables.account_tags.tf | ||
| LINKTOP includes.d/variables.account_tags.auto.tfvars | ||
| LINKTOP includes.d/variables.infrastructure_tags.tf | ||
| LINKTOP includes.d/variables.infrastructure_tags.auto.tfvars | ||
| LINKTOP includes.d/variables.application_tags.tf | ||
| LINKTOP includes.d/variables.application_tags.auto.tfvars | ||
| # LINKTOP provider_configs.d/provider.ldap_new.auto.tfvars | ||
| # LINKTOP provider_configs.d/provider.ldap_new.tf | ||
| # LINKTOP provider_configs.d/provider.ldap_new.variables.tf | ||
| COMMAND rm -f provider.ldap.* | ||
|
|
||
| TAG init | ||
| COMMAND tf-init | ||
|
|
||
| TAG start | ||
| #POLICY | ||
| ALL | ||
|
|
||
| TAG state-link | ||
| COMMAND tf-directory-setup.py -l s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| variable "business" { | ||
| description = "Business label (organization, program, etc)" | ||
| type = string | ||
| type = string | ||
| } | ||
|
|
||
| variable "application" { | ||
| description = "Application label" | ||
| type = string | ||
| type = string | ||
| } | ||
|
|
||
| variable "environment" { | ||
| description = "Environment label" | ||
| type = string | ||
| type = string | ||
|
|
||
| validation { | ||
| condition = contains(["dev","test","qa","uat","ite","stage","prod","cre","sa","services","common"],var.environment) | ||
| error_message = "var.environment value invalid. See https://github.e.it.census.gov/terraform/cloud-information/tree/master/aws/documentation/naming-tagging-standard for valid list." | ||
| condition = contains(["dev", "test", "qa", "uat", "ite", "stage", "prod", "cre", "sa", "services", "common"], var.environment) | ||
| error_message = "The var.environment value invalid. See https://github.e.it.census.gov/terraform/cloud-information/tree/master/aws/documentation/naming-tagging-standard for valid list." | ||
| } | ||
| } | ||
|
|
||
| variable "custom" { | ||
| description = "Custom label" | ||
| type = string | ||
| default = null | ||
| type = string | ||
| default = null | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../common/version.tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| terraform { | ||
| required_version = ">= 1.0.0" | ||
| required_providers { | ||
| # aws = { | ||
| # source = "hashicorp/aws" | ||
| # version = ">= 5.0" | ||
| # } | ||
| # ldap = { | ||
| # source = "trevex/ldap" | ||
| # version = ">= 0.5.4" | ||
| # } | ||
| # external = { | ||
| # source = "hashicorp/external" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # null = { | ||
| # source = "hashicorp/null" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # random = { | ||
| # source = "hashicorp/random" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # template = { | ||
| # source = "hashicorp/template" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # infoblox = { | ||
| # source = "infobloxopen/infoblox" | ||
| # version = ">= 2.1.0" | ||
| # } | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| locals { | ||
| _module_version = "0.1.0" | ||
| _module_version = "0.2.0" | ||
| _module_name = "boc-nts" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module "tags" { | ||
| # source = "git@github.e.it.census.gov:terraform-modules/boc-nts//tags" | ||
| source = "../../tags" | ||
| filename = format("%v/%v", path.root, "tags.yml") | ||
|
|
||
| legacy_tags = merge( | ||
| var.account_tags, | ||
| var.infrastructure_tags, | ||
| var.application_tags, | ||
| ) | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| variable "application_tags" { | ||
| description = "Map of application tags" | ||
| type = map(string) | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| terraform { | ||
| required_providers { | ||
| aws = { | ||
| source = "hashicorp/aws" | ||
| version = ">= 4.0" | ||
| } | ||
| # ldap = { | ||
| # source = "trevex/ldap" | ||
| # version = ">= 0.5.4" | ||
| # } | ||
| # external = { | ||
| # source = "hashicorp/external" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # null = { | ||
| # source = "hashicorp/null" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # random = { | ||
| # source = "hashicorp/random" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # template = { | ||
| # source = "hashicorp/template" | ||
| # version = ">= 1.0" | ||
| # } | ||
| # infoblox = { | ||
| # source = "infobloxopen/infoblox" | ||
| # version = ">= 2.1.0" | ||
| # } | ||
| } | ||
| required_version = ">= 1.0.0" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters