You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flow_log_cloudwatch_log_group_kms_key_arn = "arn:aws:kms:us-east-2:222222222222:key/kms_key_arn" #Enter your kms key arn
43
44
}
44
45
```
45
46
Refer [this](https://github.com/squareops/terraform-aws-vpc/tree/main/examples) for more examples.
@@ -50,6 +51,42 @@ To prevent destruction interruptions, any resources that have been created outsi
50
51
51
52
The private key generated by Keypair module will be stored in AWS Systems Manager Parameter Store. For more details refer [this](https://registry.terraform.io/modules/squareops/keypair/aws)
52
53
54
+
For encrypting vpc flow log cloudwatch log group please use this kms key policy. Change the account id and region.
55
+
56
+
```json
57
+
{
58
+
"Version": "2012-10-17",
59
+
"Id": "allow-cloudwatch-logs-encryption",
60
+
"Statement": [
61
+
{
62
+
"Sid": "AllowRootFullPermissions",
63
+
"Effect": "Allow",
64
+
"Principal": {
65
+
"AWS": "arn:aws:iam::12345678:root"
66
+
},
67
+
"Action": "kms:*",
68
+
"Resource": "*"
69
+
},
70
+
{
71
+
"Sid": "AllowCloudWatchLogsEncryption",
72
+
"Effect": "Allow",
73
+
"Principal": {
74
+
"Service": "logs.us-east-2.amazonaws.com"
75
+
},
76
+
"Action": [
77
+
"kms:Encrypt*",
78
+
"kms:Decrypt*",
79
+
"kms:ReEncrypt*",
80
+
"kms:GenerateDataKey*",
81
+
"kms:Describe*"
82
+
],
83
+
"Resource": "*"
84
+
}
85
+
]
86
+
}
87
+
```
88
+
89
+
53
90
## Network Scenarios
54
91
55
92
Users need to declare `vpc_cidr` and subnets are calculated with the help of in-built functions.
@@ -81,6 +118,7 @@ This module supports three scenarios to create Network resource on AWS. Each wil
-**vpc-peering:** VPC peering support is available using submodule `vpc_peering`. Refer [Peering Docs](https://github.com/squareops/terraform-aws-vpc/tree/main/modules/vpc_peering) for more information
86
124
-`accepter_name = ""`
@@ -175,12 +213,13 @@ In this module, we have implemented the following CIS Compliance checks for VPC:
175
213
| Name | Description | Type | Default | Required |
| <aname="input_auto_assign_public_ip"></a> [auto\_assign\_public\_ip](#input\_auto\_assign\_public\_ip)| Specify true to indicate that instances launched into the subnet should be assigned a public IP address. |`bool`|`false`| no |
178
-
| <aname="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones)| Number of Availability Zone to be used by VPC Subnets |`number`|`2`| no |
216
+
| <aname="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones)| Number of Availability Zone to be used by VPC Subnets |`list(any)`|`[]`| no |
179
217
| <aname="input_database_subnet_assign_ipv6_address_on_creation"></a> [database\_subnet\_assign\_ipv6\_address\_on\_creation](#input\_database\_subnet\_assign\_ipv6\_address\_on\_creation)| Assign IPv6 address on database subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map\_public\_ip\_on\_launch |`bool`|`null`| no |
180
218
| <aname="input_database_subnet_cidrs"></a> [database\_subnet\_cidrs](#input\_database\_subnet\_cidrs)| Database Tier subnet CIDRs to be created |`list(any)`|`[]`| no |
181
219
| <aname="input_database_subnet_enabled"></a> [database\_subnet\_enabled](#input\_database\_subnet\_enabled)| Set true to enable database subnets |`bool`|`false`| no |
182
220
| <aname="input_default_network_acl_ingress"></a> [default\_network\_acl\_ingress](#input\_default\_network\_acl\_ingress)| List of maps of ingress rules to set on the Default Network ACL |`list(map(string))`| <pre>[<br> {<br> "action": "deny",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 22,<br> "protocol": "tcp",<br> "rule_no": 98,<br> "to_port": 22<br> },<br> {<br> "action": "deny",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 3389,<br> "protocol": "tcp",<br> "rule_no": 99,<br> "to_port": 3389<br> },<br> {<br> "action": "allow",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 0,<br> "protocol": "-1",<br> "rule_no": 100,<br> "to_port": 0<br> },<br> {<br> "action": "allow",<br> "from_port": 0,<br> "ipv6_cidr_block": "::/0",<br> "protocol": "-1",<br> "rule_no": 101,<br> "to_port": 0<br> }<br>]</pre> | no |
183
221
| <aname="input_environment"></a> [environment](#input\_environment)| Specify the environment indentifier for the VPC |`string`|`""`| no |
222
+
| <aname="input_flow_log_cloudwatch_log_group_kms_key_arn"></a> [flow\_log\_cloudwatch\_log\_group\_kms\_key\_arn](#input\_flow\_log\_cloudwatch\_log\_group\_kms\_key\_arn)| The ARN of the KMS Key to use when encrypting log data for VPC flow logs |`string`|`null`| no |
184
223
| <aname="input_flow_log_cloudwatch_log_group_retention_in_days"></a> [flow\_log\_cloudwatch\_log\_group\_retention\_in\_days](#input\_flow\_log\_cloudwatch\_log\_group\_retention\_in\_days)| Specifies the number of days you want to retain log events in the specified log group for VPC flow logs. |`number`|`null`| no |
185
224
| <aname="input_flow_log_enabled"></a> [flow\_log\_enabled](#input\_flow\_log\_enabled)| Whether or not to enable VPC Flow Logs |`bool`|`false`| no |
186
225
| <aname="input_flow_log_max_aggregation_interval"></a> [flow\_log\_max\_aggregation\_interval](#input\_flow\_log\_max\_aggregation\_interval)| The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: `60` seconds or `600` seconds. |`number`|`60`| no |
0 commit comments