Skip to content

Commit 8504ae7

Browse files
authored
Merge pull request #9 from clouddrove/CD-147
fix labels managedby variables
2 parents 43c2a34 + ddfaee3 commit 8504ae7

File tree

4 files changed

+49
-35
lines changed

4 files changed

+49
-35
lines changed

README.md

+40-34
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Terraform AWS VPC
88
</h1>
99

10-
<p align="center" style="font-size: 1.2rem;">
10+
<p align="center" style="font-size: 1.2rem;">
1111
Terraform module to create VPC resource on AWS.
1212
</p>
1313

@@ -38,7 +38,7 @@
3838
<hr>
3939

4040

41-
We eat, drink, sleep and most importantly love **DevOps**. We are working towards stratergies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
41+
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
4242

4343
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
4444

@@ -49,7 +49,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
4949

5050
## Prerequisites
5151

52-
This module has a few dependencies:
52+
This module has a few dependencies:
5353

5454
- [Terraform 0.12](https://learn.hashicorp.com/terraform/getting-started/install.html)
5555
- [Go](https://golang.org/doc/install)
@@ -61,16 +61,18 @@ This module has a few dependencies:
6161

6262

6363

64+
6465
## Examples
6566

67+
6668
**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/terraform-aws-vpc/releases).
6769

6870

6971
### Simple Example
7072
Here is an example of how you can use this module in your inventory structure:
7173
```hcl
7274
module "vpc" {
73-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.12.4"
75+
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.12.5"
7476
name = "vpc"
7577
application = "clouddrove"
7678
environment = "test"
@@ -81,47 +83,51 @@ Here is an example of how you can use this module in your inventory structure:
8183

8284

8385

86+
87+
88+
8489
## Inputs
8590

8691
| Name | Description | Type | Default | Required |
8792
|------|-------------|:----:|:-----:|:-----:|
88-
| application | Application (e.g. `cd` or `clouddrove`). | string | `` | no |
89-
| attributes | Additional attributes (e.g. `1`). | list | `<list>` | no |
90-
| cidr_block | CIDR for the VPC. | string | `` | no |
91-
| enable_classiclink | A boolean flag to enable/disable ClassicLink for the VPC. | bool | `false` | no |
92-
| enable_classiclink_dns_support | A boolean flag to enable/disable ClassicLink DNS Support for the VPC. | bool | `false` | no |
93-
| enable_dns_hostnames | A boolean flag to enable/disable DNS hostnames in the VPC. | bool | `true` | no |
94-
| enable_dns_support | A boolean flag to enable/disable DNS support in the VPC. | bool | `true` | no |
95-
| enable_flow_log | Enable vpc_flow_log logs. | bool | `false` | no |
96-
| environment | Environment (e.g. `prod`, `dev`, `staging`). | string | `` | no |
97-
| instance_tenancy | A tenancy option for instances launched into the VPC. | string | `default` | no |
98-
| label_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
99-
| name | Name (e.g. `app` or `cluster`). | string | `` | no |
100-
| s3_bucket_arn | S3 ARN for vpc logs. | string | `` | no |
101-
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | map | `<map>` | no |
102-
| traffic_type | Type of traffic to capture. Valid values: ACCEPT,REJECT, ALL. | string | `ALL` | no |
103-
| vpc_enabled | Flag to control the vpc creation. | bool | `true` | no |
93+
| application | Application \(e.g. `cd` or `clouddrove`\). | string | `""` | no |
94+
| attributes | Additional attributes \(e.g. `1`\). | list | `<list>` | no |
95+
| cidr\_block | CIDR for the VPC. | string | `""` | no |
96+
| enable\_classiclink | A boolean flag to enable/disable ClassicLink for the VPC. | bool | `"false"` | no |
97+
| enable\_classiclink\_dns\_support | A boolean flag to enable/disable ClassicLink DNS Support for the VPC. | bool | `"false"` | no |
98+
| enable\_dns\_hostnames | A boolean flag to enable/disable DNS hostnames in the VPC. | bool | `"true"` | no |
99+
| enable\_dns\_support | A boolean flag to enable/disable DNS support in the VPC. | bool | `"true"` | no |
100+
| enable\_flow\_log | Enable vpc\_flow\_log logs. | bool | `"false"` | no |
101+
| environment | Environment \(e.g. `prod`, `dev`, `staging`\). | string | `""` | no |
102+
| instance\_tenancy | A tenancy option for instances launched into the VPC. | string | `"default"` | no |
103+
| label\_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
104+
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | string | `"[email protected]"` | no |
105+
| name | Name \(e.g. `app` or `cluster`\). | string | `""` | no |
106+
| s3\_bucket\_arn | S3 ARN for vpc logs. | string | `""` | no |
107+
| tags | Additional tags \(e.g. map\(`BusinessUnit`,`XYZ`\). | map | `<map>` | no |
108+
| traffic\_type | Type of traffic to capture. Valid values: ACCEPT,REJECT, ALL. | string | `"ALL"` | no |
109+
| vpc\_enabled | Flag to control the vpc creation. | bool | `"true"` | no |
104110

105111
## Outputs
106112

107113
| Name | Description |
108114
|------|-------------|
109-
| igw_id | The ID of the Internet Gateway. |
110-
| ipv6_cidr_block | The IPv6 CIDR block. |
115+
| igw\_id | The ID of the Internet Gateway. |
116+
| ipv6\_cidr\_block | The IPv6 CIDR block. |
111117
| tags | A mapping of tags to assign to the resource. |
112-
| vpc_cidr_block | The CIDR block of the VPC. |
113-
| vpc_default_network_acl_id | The ID of the network ACL created by default on VPC creation. |
114-
| vpc_default_route_table_id | The ID of the route table created by default on VPC creation. |
115-
| vpc_default_security_group_id | The ID of the security group created by default on VPC creation. |
116-
| vpc_id | The ID of the VPC. |
117-
| vpc_ipv6_association_id | The association ID for the IPv6 CIDR block. |
118-
| vpc_main_route_table_id | The ID of the main route table associated with this VPC. |
118+
| vpc\_cidr\_block | The CIDR block of the VPC. |
119+
| vpc\_default\_network\_acl\_id | The ID of the network ACL created by default on VPC creation. |
120+
| vpc\_default\_route\_table\_id | The ID of the route table created by default on VPC creation. |
121+
| vpc\_default\_security\_group\_id | The ID of the security group created by default on VPC creation. |
122+
| vpc\_id | The ID of the VPC. |
123+
| vpc\_ipv6\_association\_id | The association ID for the IPv6 CIDR block. |
124+
| vpc\_main\_route\_table\_id | The ID of the main route table associated with this VPC. |
119125

120126

121127

122-
## Testing
123128

124-
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
129+
## Testing
130+
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
125131

126132
You need to run the following command in the testing folder:
127133
```hcl
@@ -130,10 +136,10 @@ You need to run the following command in the testing folder:
130136

131137

132138

133-
## Feedback
139+
## Feedback
134140
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-vpc/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).
135141

136-
If you have found it worth your time, go ahead and give us a * on [our GitHub](https://github.com/clouddrove/terraform-aws-vpc)!
142+
If you have found it worth your time, go ahead and give us a on [our GitHub](https://github.com/clouddrove/terraform-aws-vpc)!
137143

138144
## About us
139145

@@ -148,4 +154,4 @@ At [CloudDrove][website], we offer expert guidance, implementation support and s
148154
[linkedin]: https://cpco.io/linkedin
149155
[twitter]: https://twitter.com/clouddrove/
150156
[email]: https://clouddrove.com/contact-us.html
151-
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=
157+
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=

README.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ usage : |-
3737
Here is an example of how you can use this module in your inventory structure:
3838
```hcl
3939
module "vpc" {
40-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.12.4"
40+
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=tags/0.12.5"
4141
name = "vpc"
4242
application = "clouddrove"
4343
environment = "test"

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module "labels" {
1212
name = var.name
1313
application = var.application
1414
environment = var.environment
15+
managedby = var.managedby
1516
label_order = var.label_order
1617
}
1718

variables.tf

+7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ variable "label_order" {
2424
description = "Label order, e.g. `name`,`application`."
2525
}
2626

27+
28+
variable "managedby" {
29+
type = string
30+
default = "[email protected]"
31+
description = "ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'."
32+
}
33+
2734
variable "attributes" {
2835
type = list
2936
default = []

0 commit comments

Comments
 (0)