-
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
35 changed files
with
175 additions
and
5 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,26 @@ | ||
| # This submodule creates the following resources, using a typical deployment configuration that we follow: | ||
| # * VPC | ||
| # * Route tables (one per availability zone) | ||
| # * Subnets, public and private (one of each label per availability zone) | ||
| # * Network ACLs | ||
| # * Base security groups | ||
| # * VPN components (optional) | ||
| # * Internet Gateway and NAT gateway (optional) | ||
| # | ||
| # This module also includes a submodule to setup VPC peering. | ||
|
|
||
| #--- | ||
| # security groups | ||
| #--- | ||
| module "security-groups" | ||
| # source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//security-groups" | ||
| source = "${path.module}/../security-groups" | ||
| vpc_id = aws_vpc.vpc.id | ||
| vpc_full_name = var.vpc_full_name | ||
| vpc_environment = var.vpc_environment | ||
| tags = {} | ||
| } | ||
|
|
||
| #--- | ||
| # VPNs on per site | ||
| #--- |
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_name = "aws-vpc-setup" | ||
| } |
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,3 +1,19 @@ | ||
| locals { | ||
| _module_version = "2.0.0" | ||
| _module_version = "2.0.1" | ||
| _module_names = { | ||
| "_main_" = "aws-vpc-setup" | ||
|
|
||
| "flowlogs" = "aws-vpc-setup//flowlogs" | ||
| "flowlogs-role" = "aws-vpc-setup//flowlogs-role" | ||
| "nacl-rules" = "aws-vpc-setup//nacl-rules" | ||
| "nacls" = "aws-vpc-setup//nacls" | ||
| "peer" = "aws-vpc-setup//peer" | ||
| "routing" = "aws-vpc-setup//routing" | ||
| "security-groups" = "aws-vpc-setup//security-groups" | ||
| "subnets" = "aws-vpc-setup//subnets" | ||
| "vpc" = "aws-vpc-setup//vpc" | ||
| "vpc-interface-endpoint" = "aws-vpc-setup//vpc-interface-endpoint" | ||
| "vpn" = "aws-vpc-setup//vpn" | ||
| "vpn-transit-gateway" = "aws-vpc-setup//vpn-transit-gateway" | ||
| } | ||
| } |
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 @@ | ||
| # % aws --profile $(get-profile) --region $(get-region) service-quotas list-services | ||
| # % aws --profile $(get-profile) --region $(get-region) service-quotas list-service-quotas --service-code s3 | ||
| # % aws --profile $(get-profile) --region $(get-region) service-quotas list-aws-default-service-quotas --service-code s3 | ||
| # | ||
| # { | ||
| # "ServiceCode": "s3", | ||
| # "ServiceName": "Amazon Simple Storage Service (Amazon S3)", | ||
| # "QuotaArn": "arn:aws-us-gov:servicequotas:us-gov-west-1::s3/L-DC2B2D3D", | ||
| # "QuotaCode": "L-DC2B2D3D", | ||
| # "QuotaName": "Buckets", | ||
| # "Value": 100.0, | ||
| # "Unit": "None", | ||
| # "Adjustable": true, | ||
| # "GlobalQuota": false | ||
| # }, | ||
|
|
||
| locals { | ||
| quotas = yamldecode(file("quotas.yml")) | ||
| quota_map = { for v in local.quotas.quotas : format("%v:%v", v.service_code, v.quota_code) => v } | ||
| } | ||
|
|
||
| resource "aws_servicequotas_service_quota" "quotas" { | ||
| for_each = local.quota_map | ||
| quota_code = each.value.quota_code | ||
| service_code = each.value.service_code | ||
| value = each.value.value | ||
| } |
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,31 @@ | ||
| quotas: | ||
| - description: "EBS SSD gp2 size increase" | ||
| service_code: ebs | ||
| quota_code: "L-D18FCD1D" | ||
| default_value: 300 | ||
| value: 1500 | ||
|
|
||
|
|
||
| # structure of each item | ||
| # description: string, like a comment describing what this is doing, maybe why. It is currently only for documenting the request | ||
| # service_code: string, required, the specific service for which the quota will be submitted. comes from | ||
| # aws --profile PROFILE --region REGION service-quotas list-services | ||
| # quota_code: string, required, the specific quota code for the service. Comes from: | ||
| # aws --profile PROFILE --region REGION service-quotas list-service-quotas --service-code SERVICE_CODE | ||
| # default_value: string, optional, used for indicating the default value (maybe ned to change to previous?). Comes from: | ||
| # aws --profile PROFILE -region REGION service-quotas list-aws-default-service-quotas --service-code SERVICE_CODE | ||
| # value: number, required, used to indicate the new value requestd | ||
| # | ||
| # example from list from default_value | ||
| # | ||
| # { | ||
| # "ServiceCode": "s3", | ||
| # "ServiceName": "Amazon Simple Storage Service (Amazon S3)", | ||
| # "QuotaArn": "arn:aws-us-gov:servicequotas:us-gov-west-1::s3/L-DC2B2D3D", | ||
| # "QuotaCode": "L-DC2B2D3D", | ||
| # "QuotaName": "Buckets", | ||
| # "Value": 100.0, | ||
| # "Unit": "None", | ||
| # "Adjustable": true, | ||
| # "GlobalQuota": false | ||
| # }, |
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,3 @@ | ||
| locals { | ||
| _module_name = "flowlogs-role" | ||
| } |
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
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_name = "flowlogs" | ||
| } |
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
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_name = "nacl-rules" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "nacls" | ||
| } |
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
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_name = "peer" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "routing" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "security-groups" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "subnets" | ||
| } |
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
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_name = "vpc-interface-endpoint" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "vpc" | ||
| } |
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
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_name = "vpn-transit-gateway" | ||
| } |
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,3 @@ | ||
| locals { | ||
| _module_name = "vpn" | ||
| } |