-
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
0 parents
commit fedca4e
Showing
13 changed files
with
199 additions
and
0 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| title: '' | ||
| labels: bug | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Describe the bug** | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| **Identify Environment** | ||
| - Terraform version [`terraform -version`]: | ||
| - Repository [`git remote -v show`]: | ||
| - Git branch [`git branch`]: | ||
| - Current working directory [`pwd`]: | ||
| - Commands issued | ||
| - Errors generated | ||
|
|
||
| **Expected behavior** | ||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| **Screenshots** | ||
| If applicable, add pasted text output from terraform plan or apply (or a screenshot, but text is preferred) to help explain your problem. | ||
|
|
||
| **Server (please complete the following information):** | ||
| - Hostname [e.g. redwood.cto.census.gov] | ||
| - OS Version [e.g. RHEL6, RHEL7] | ||
|
|
||
| **Additional context** | ||
| Add any other context about the problem here. |
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,15 @@ | ||
| # Local .terraform directories | ||
| **/.terraform/* | ||
|
|
||
| # .tfstate files | ||
| *.tfstate | ||
| *.tfstate.* | ||
|
|
||
| # .tfvars files | ||
| *.tfvars | ||
|
|
||
| .terraform/* | ||
| logs | ||
| common/README.md | ||
|
|
||
| OLD/ |
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,18 @@ | ||
| repos: | ||
| - repo: https://github.com/antonbabenko/pre-commit-terraform | ||
| rev: v1.48.0 | ||
| hooks: | ||
| # - id: terraform_validate | ||
| - id: terraform_fmt | ||
| - id: terraform_docs_replace | ||
| args: ['table'] | ||
| exclude: common/*.tf | ||
| exclude: version.tf | ||
| - id: terraform_tflint | ||
| args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v3.4.0 | ||
| hooks: | ||
| - id: check-symlinks | ||
| - id: detect-aws-credentials | ||
| - id: detect-private-key |
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,21 @@ | ||
| config { | ||
| module = true | ||
| force = false | ||
| disabled_by_default = false | ||
|
|
||
| # ignore_module = { | ||
| # "terraform-aws-modules/vpc/aws" = true | ||
| # "terraform-aws-modules/security-group/aws" = true | ||
| # } | ||
|
|
||
| # varfile = ["example1.tfvars", "example2.tfvars"] | ||
| # variables = ["foo=bar", "bar=[\"baz\"]"] | ||
| } | ||
|
|
||
| rule "aws_instance_invalid_type" { | ||
| enabled = true | ||
| } | ||
|
|
||
| plugin "aws" { | ||
| enabled = true | ||
| } |
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,5 @@ | ||
| # Versions | ||
|
|
||
| * v1.0.0 -- {{ yyyy-mm-dd }} | ||
| - initial creation | ||
|
|
Empty file.
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,30 @@ | ||
| # locals { | ||
| # az_list = data.aws_availability_zones.zones.names | ||
| # az_count = length(local.az_list) | ||
| # az_count_list = range(local.az_count) | ||
| # } | ||
|
|
||
| data "aws_availability_zones" "zones" { | ||
| state = "available" | ||
| } | ||
|
|
||
| data "aws_availability_zone" "zone" { | ||
| count = length(data.aws_availability_zones.zones.names) | ||
| state = "available" | ||
| name = data.aws_availability_zones.zones.names[count.index] | ||
| } | ||
|
|
||
| output "availability_zone_names" { | ||
| description = "VPC Availability zone name list (3)" | ||
| value = data.aws_availability_zones.zones.names | ||
| } | ||
|
|
||
| output "availability_zone_ids" { | ||
| description = "VPC Availability zone id list (3)" | ||
| value = data.aws_availability_zones.zones.zone_ids | ||
| } | ||
|
|
||
| output "availability_zone_suffixes" { | ||
| description = "VPC Availability zone suffix list (3)" | ||
| value = data.aws_availability_zone.zone[*].name_suffix | ||
| } |
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 @@ | ||
| data "aws_caller_identity" "current" {} | ||
|
|
||
| data "aws_arn" "current" { | ||
| arn = data.aws_caller_identity.current.arn | ||
| } | ||
|
|
||
| data "aws_region" "current" {} |
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,9 @@ | ||
| locals { | ||
| account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id | ||
| account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew" | ||
|
|
||
| base_tags = { | ||
| "boc:tf_module_version" = local._module_version | ||
| "boc:created_by" = "terraform" | ||
| } | ||
| } |
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,28 @@ | ||
| locals { | ||
| _prefixes = { | ||
| "efs" = "v-efs-" | ||
| "s3" = "v-s3-" | ||
| "ebs" = "v-ebs-" | ||
| "kms" = "k-kms-" | ||
| "role" = "r-" | ||
| "policy" = "p-" | ||
| "group" = "g-" | ||
| "security-group" = "" # "sg-" | ||
| # VPC | ||
| "vpc" = "" | ||
| "dhcp-options" = "" | ||
| "vpc-peer" = "vpcp-" | ||
| "route-table" = "route-" | ||
| "subnet" = "" | ||
| "vpc-endpoint" = "vpce-" | ||
| "elastic-ip" = "eip-" | ||
| "nat-gateway" = "nat-" | ||
| "internet-gateway" = "igw-" | ||
| "network-acl" = "nacl-" | ||
| "customer-gateway" = "cgw-" | ||
| "vpn-gateway" = "vpcg-" | ||
| "vpn-connection" = "vpn_" | ||
| "log-group" = "lg-" | ||
| "log-stream" = "lgs-" | ||
| } | ||
| } |
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,5 @@ | ||
| variable "availability_zones" { | ||
| description = "AWS Availability Zones to use (by default will use all available)" | ||
| type = list(string) | ||
| default = [] | ||
| } |
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,26 @@ | ||
| #--- | ||
| # account info | ||
| #--- | ||
| variable "account_id" { | ||
| description = "AWS Account ID (default will pull from current user)" | ||
| type = string | ||
| default = "" | ||
| } | ||
|
|
||
| variable "account_alias" { | ||
| description = "AWS Account Alias" | ||
| type = string | ||
| default = "" | ||
| } | ||
|
|
||
| variable "override_prefixes" { | ||
| description = "Override built-in prefixes by component. This should be used primarily for common infrastructure things" | ||
| type = map(string) | ||
| default = {} | ||
| } | ||
|
|
||
| variable "tags" { | ||
| description = "AWS Tags to apply to appropriate resources" | ||
| type = map(string) | ||
| default = {} | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_version = "0.0.0" | ||
| } |