Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
- uses: pre-commit/action@v3.0.1
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8

- uses: pre-commit/action@v3.0.1
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ To get started, make sure you have configured your AWS provider. You can use the


```hcl
module "vpc" {
source = "git@github.com:opszero/terraform-aws-vpc.git"
name = "test"
cidr_block = "10.0.0.0/16"
additional_cidr_block = ["172.3.0.0/16", "172.2.0.0/16"]
module "vpc" {
source = "git::https://github.com/opszero/terraform-aws-vpc.git?ref=v1.0.1"
name = "test"
cidr_block = "10.0.0.0/16"
additional_cidr_block = ["172.3.0.0/16", "172.2.0.0/16"]
}
```
```

## Examples
For detailed examples on how to use this module, please refer to the [Examples](https://github.com/opszero/terraform-aws-vpc/tree/master/example) directory within this repository.
Expand All @@ -47,7 +47,7 @@ This project is licensed under the **MIT** License - see the [LICENSE](https://g

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >=5.67.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.14.0 |
## Inputs

| Name | Description | Type | Default | Required |
Expand All @@ -59,13 +59,13 @@ This project is licensed under the **MIT** License - see the [LICENSE](https://g
| <a name="input_block_http_traffic"></a> [block\_http\_traffic](#input\_block\_http\_traffic) | True when http traffic has to be blocked for S3. | `bool` | `true` | no |
| <a name="input_cidr_block"></a> [cidr\_block](#input\_cidr\_block) | CIDR for the VPC. | `string` | `""` | no |
| <a name="input_create_flow_log_cloudwatch_iam_role"></a> [create\_flow\_log\_cloudwatch\_iam\_role](#input\_create\_flow\_log\_cloudwatch\_iam\_role) | Flag to be set true when cloudwatch iam role is to be created when flow log destination type is set to cloudwatch logs. | `bool` | `true` | no |
| <a name="input_default_network_acl_egress"></a> [default\_network\_acl\_egress](#input\_default\_network\_acl\_egress) | List of maps of egress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<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 |
| <a name="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": "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 |
| <a name="input_default_network_acl_egress"></a> [default\_network\_acl\_egress](#input\_default\_network\_acl\_egress) | List of maps of egress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<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 |
| <a name="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": "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 |
| <a name="input_default_route_table_routes"></a> [default\_route\_table\_routes](#input\_default\_route\_table\_routes) | Configuration block of routes. | `list(map(string))` | `[]` | no |
| <a name="input_default_security_group_egress"></a> [default\_security\_group\_egress](#input\_default\_security\_group\_egress) | List of maps of egress rules to set on the default security group | `list(map(string))` | `[]` | no |
| <a name="input_default_security_group_ingress"></a> [default\_security\_group\_ingress](#input\_default\_security\_group\_ingress) | List of maps of ingress rules to set on the default security group | `list(map(string))` | `[]` | no |
| <a name="input_dhcp_options_domain_name"></a> [dhcp\_options\_domain\_name](#input\_dhcp\_options\_domain\_name) | Specifies DNS name for DHCP options set (requires enable\_dhcp\_options set to true) | `string` | `"service.consul"` | no |
| <a name="input_dhcp_options_domain_name_servers"></a> [dhcp\_options\_domain\_name\_servers](#input\_dhcp\_options\_domain\_name\_servers) | Specify a list of DNS server addresses for DHCP options set, default to AWS provided (requires enable\_dhcp\_options set to true) | `list(string)` | <pre>[<br/> "AmazonProvidedDNS"<br/>]</pre> | no |
| <a name="input_dhcp_options_domain_name_servers"></a> [dhcp\_options\_domain\_name\_servers](#input\_dhcp\_options\_domain\_name\_servers) | Specify a list of DNS server addresses for DHCP options set, default to AWS provided (requires enable\_dhcp\_options set to true) | `list(string)` | <pre>[<br> "AmazonProvidedDNS"<br>]</pre> | no |
| <a name="input_dhcp_options_netbios_name_servers"></a> [dhcp\_options\_netbios\_name\_servers](#input\_dhcp\_options\_netbios\_name\_servers) | Specify a list of netbios servers for DHCP options set (requires enable\_dhcp\_options set to true) | `list(string)` | `[]` | no |
| <a name="input_dhcp_options_netbios_node_type"></a> [dhcp\_options\_netbios\_node\_type](#input\_dhcp\_options\_netbios\_node\_type) | Specify netbios node\_type for DHCP options set (requires enable\_dhcp\_options set to true) | `string` | `""` | no |
| <a name="input_dhcp_options_ntp_servers"></a> [dhcp\_options\_ntp\_servers](#input\_dhcp\_options\_ntp\_servers) | Specify a list of NTP servers for DHCP options set (requires enable\_dhcp\_options set to true) | `list(string)` | `[]` | no |
Expand Down Expand Up @@ -100,7 +100,7 @@ This project is licensed under the **MIT** License - see the [LICENSE](https://g
| <a name="input_name"></a> [name](#input\_name) | Default name tag | `string` | n/a | yes |
| <a name="input_restrict_default_sg"></a> [restrict\_default\_sg](#input\_restrict\_default\_sg) | Flag to control the restrict default sg creation. | `bool` | `true` | no |
| <a name="input_s3_sse_algorithm"></a> [s3\_sse\_algorithm](#input\_s3\_sse\_algorithm) | Server-side encryption algorithm to use. Valid values are AES256 and aws:kms | `string` | `"aws:kms"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Custom tags (optional) | `map(string)` | <pre>{<br/> "Environment": "dev"<br/>}</pre> | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Custom tags (optional) | `map(string)` | <pre>{<br> "Environment": "dev"<br>}</pre> | no |
| <a name="input_vpc_flow_log_permissions_boundary"></a> [vpc\_flow\_log\_permissions\_boundary](#input\_vpc\_flow\_log\_permissions\_boundary) | The ARN of the Permissions Boundary for the VPC Flow Log IAM Role | `string` | `null` | no |
## Resources

Expand Down
5 changes: 3 additions & 2 deletions example/versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.9.5"
required_version = ">= 1.13.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">=5.67.0"
version = ">= 6.14.0"
}
}
}
7 changes: 4 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.9.5"
required_version = ">= 1.13.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">=5.67.0"
version = ">= 6.14.0"
}
}
}
}