Skip to content

Commit 5518c01

Browse files
cdcmecarlodicelico
authored andcommitted
Update for 0.12
Signed-off-by: Carlo DiCelico <[email protected]>
1 parent 8491737 commit 5518c01

25 files changed

+286
-251
lines changed

CHANGELOG.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
- TBD
99

10+
## v0.3.0
11+
### Updated
12+
- Upgrades for Terraform v0.12 (fixes #8)
13+
1014
## v0.2.0
1115
### Added
1216
- Subnet information to VPC outputs (fixes #4)
@@ -21,8 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2125
- VPC creation and configuration
2226
- Documentation, including:
2327
- this CHANGELOG
24-
- [AUTHORS](https://github.com/minnowpod/terraform-google-project/tree/master/AUTHORS)
25-
- [CONDUCT](https://github.com/minnowpod/terraform-google-project/tree/master/CONDUCT.md)
26-
- [CONTRIBUTING](https://github.com/minnowpod/terraform-google-project/tree/master/CONTRIBUTING.md)
27-
- [LICENSE](https://github.com/minnowpod/terraform-google-project/tree/master/LICENSE)
28-
- [README](https://github.com/minnowpod/terraform-google-project/tree/master/README.md)
28+
- [AUTHORS](https://github.com/carlodicelico/terraform-google-project/tree/master/AUTHORS)
29+
- [CONDUCT](https://github.com/carlodicelico/terraform-google-project/tree/master/CONDUCT.md)
30+
- [CONTRIBUTING](https://github.com/carlodicelico/terraform-google-project/tree/master/CONTRIBUTING.md)
31+
- [LICENSE](https://github.com/carlodicelico/terraform-google-project/tree/master/LICENSE)
32+
- [README](https://github.com/carlodicelico/terraform-google-project/tree/master/README.md)

CONDUCT.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Code of Conduct
2-
The Minnow Open Source community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences great successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines which help steer our interactions and strive to keep Minnow Open Source a positive, successful, and growing community.
2+
The Open Source community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences great successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines which help steer our interactions and strive to keep Open Source a positive, successful, and growing community.
33

4-
A member of the Minnow Open Source community is:
4+
A member of the Open Source community is:
55

66
## Open
77
Members of the community are open to collaboration, whether it's on GitHub, email, IRC or otherwise. We're receptive to constructive comment and criticism, as the experiences and skill sets of other members contribute to the whole of our efforts. We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate and everyone can make a difference.
88

99
## Considerate
10-
Members of the community are considerate of their peers - other Minnow Open Source users. We're thoughtful when addressing the efforts of others, keeping in mind that oftentimes their labor was completed simply for the good of the community. We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views.
10+
Members of the community are considerate of their peers - other Open Source users. We're thoughtful when addressing the efforts of others, keeping in mind that oftentimes their labor was completed simply for the good of the community. We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views.
1111

1212
## Respectful
13-
Members of the community are respectful. We're respectful of others, their positions, their skills, their commitments, and their efforts. We're respectful of the volunteer efforts that permeate the Minnow Open Source community. We're respectful of the processes set forth in the community, and we work within them. When we disagree, we are courteous in raising our issues.
13+
Members of the community are respectful. We're respectful of others, their positions, their skills, their commitments, and their efforts. We're respectful of the volunteer efforts that permeate the Open Source community. We're respectful of the processes set forth in the community, and we work within them. When we disagree, we are courteous in raising our issues.
1414

1515
Overall, we're good to each other. We contribute to this community not because we have to, but because we want to. If we remember that, these guidelines will come naturally.
1616

17-
# Diversity
18-
The Minnow Open Source community welcomes and encourages participation by everyone. Our community is based on mutual respect, tolerance, and encouragement, and we are working to help each other live up to these principles. We want our community to be more diverse: whoever you are, and whatever your background, we welcome you.
17+
# Diverse
18+
The Open Source community welcomes and encourages participation by everyone. Our community is based on mutual respect, tolerance, and encouragement, and we are working to help each other live up to these principles. We want our community to be more diverse: whoever you are, and whatever your background, we welcome you.
1919

20-
We have created this diversity statement because we believe that a diverse Minnow Open Source community is stronger and more vibrant. A diverse community where people treat each other with respect has more potential contributors and more sources for ideas.
20+
We have created this diversity statement because we believe that a diverse Open Source community is stronger and more vibrant. A diverse community where people treat each other with respect has more potential contributors and more sources for ideas.
2121

2222
Although we have phrased the formal diversity statement generically to make it all-inclusive, we recognise that there are specific attributes that are used to discriminate against people. In alphabetical order, some of these attributes include (but are not limited to): age, culture, ethnicity, gender identity or expression, national origin, physical or mental difference, politics, race, religion, sex, sexual orientation, socio-economic status, and subculture. We welcome people regardless of the values of these or other attributes.
2323

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribution Guidelines
22

3-
First time contributing to a Minnow Open Source project? Read our [Code of Conduct](https://github.com/minnowpod/terraform-google-project/blob/master/CONDUCT.md).
3+
First time contributing to an Open Source project? Read our [Code of Conduct](https://github.com/carlodicelico/terraform-google-project/blob/master/CONDUCT.md).
44

55
Contributions to this Module are very welcome! We follow a fairly standard [pull request
66
process](https://help.github.com/articles/about-pull-requests/) for contributions, subject to the following guidelines:
@@ -85,7 +85,7 @@ to include the following:
8585
## Merge and release
8686

8787
The maintainers for this repo will review your code and provide feedback. If everything looks good, they will merge the
88-
code and release a new version, which you'll be able to find in the [releases page](https://github.com/minnowpod/terraform-google-project/tree/master/releases).
88+
code and release a new version, which you'll be able to find in the [releases page](https://github.com/carlodicelico/terraform-google-project/tree/master/releases).
8989

9090
# Attribution
9191
These guidelines are heavily based on the [HashiCorp Contribution Guidelines](https://github.com/hashicorp/terraform-google-consul/blob/master/CONTRIBUTING.md) and the [Homebrew Contribution Guidelines](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md).

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Minnow Technologies, Inc.
4-
Copyright (c) 2018 The Terraform Google Project Module Authors
3+
Copyright (c) 2020 The Terraform Google Project Module Authors
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy
76
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ Use [HCL](https://github.com/hashicorp/hcl) and Terraform as idiomatically as po
9393
| tfstate\_bucket | Project Terraform state bucket details. |
9494
| vpc | Project VPC network details. |
9595

96-
Check [_docs/graph.png](https://github.com/minnowpod/terraform-google-project/blob/master/_docs/graph.png) for the Terraform graph.
96+
Check [_docs/graph.png](https://github.com/carlodicelico/terraform-google-project/blob/master/_docs/graph.png) for the Terraform graph.
9797

9898
## Usage
9999

100100
```hcl
101101
// Create a default project
102102
module "my-project" {
103-
source = "minnowpod/terraform-google-project"
104-
version = "~> 0.2.0"
103+
source = "carlodicelico/terraform-google-project"
104+
version = "~> 0.3.0"
105105
106106
// these can also be passed from the environment with TF_VAR_billing_account, for example
107107
billing_account = "bar"
@@ -124,8 +124,8 @@ module "my-project" {
124124
125125
// Add an additional VPC network
126126
module "another-vpc" {
127-
source = "minnowpod/terraform-google-project//modules/vpc"
128-
version = "~> 0.2.0"
127+
source = "carlodicelico/terraform-google-project//modules/vpc"
128+
version = "~> 0.3.0"
129129
130130
// but skip the SSH firewall rule on this one
131131
create_ssh_fw_rule = "false"
@@ -135,26 +135,22 @@ module "another-vpc" {
135135
}
136136
```
137137

138-
See also the included [examples](https://github.com/minnowpod/terraform-google-project/tree/master/examples).
139-
140-
## Who maintains this Module?
141-
142-
This Module is maintained by [Minnow](https://minnow.me/), an IoT startup that makes smart food pickup kiosks called pods.
138+
See also the included [examples](https://github.com/carlodicelico/terraform-google-project/tree/master/examples).
143139

144140
## How do I contribute?
145141

146-
Contributions are welcome! Check out [CONTRIBUTING](https://github.com/minnowpod/terraform-google-project/tree/master/CONTRIBUTING.md) for instructions.
142+
Contributions are welcome! Check out [CONTRIBUTING](https://github.com/carlodicelico/terraform-google-project/tree/master/CONTRIBUTING.md) for instructions.
147143

148144
## How is this Module versioned?
149145

150146
This Module follows the principles of [Semantic Versioning](http://semver.org/). You can find each new release,
151-
along with the changelog, in the [CHANGELOG](https://github.com/minnowpod/terraform-google-project/tree/master/CHANGELOG.md).
147+
along with the changelog, in the [CHANGELOG](https://github.com/carlodicelico/terraform-google-project/tree/master/CHANGELOG.md).
152148

153149
During initial development, the major version will be 0 (e.g., `0.x.y`), which indicates the code does not yet have a
154150
stable API. Once we hit `1.0.0`, we will make every effort to maintain a backwards compatible API and use the MAJOR,
155151
MINOR, and PATCH versions on each release to indicate any incompatibilities.
156152

157153
## License
158154

159-
This code is released under the MIT License. Please see [LICENSE](https://github.com/minnowpod/terraform-google-project/tree/master/LICENSE) for more details.
155+
This code is released under the MIT License. Please see [LICENSE](https://github.com/carlodicelico/terraform-google-project/tree/master/LICENSE) for more details.
160156

internal.tf

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
// Generate a random pet name for memorability.
66
resource "random_pet" "project_prefix" {
7-
keepers {
8-
suffix_id = "${random_id.project_suffix.id}"
7+
keepers = {
8+
suffix_id = random_id.project_suffix.id
99
}
1010
}
1111

@@ -16,45 +16,63 @@ resource "random_id" "project_suffix" {
1616

1717
// Build a prefix for our project ID. If you want a `custom_id` and don't want a prefix, leave `id_prefix` empty and set `random_prefix` to `'false'`.
1818
data "null_data_source" "project_prefix" {
19-
inputs {
20-
value = "${var.random_prefix ? random_pet.project_prefix.id : var.id_prefix}"
19+
inputs = {
20+
value = var.random_prefix ? random_pet.project_prefix.id : var.id_prefix
2121
}
2222
}
2323

2424
// Build a random ID that is both memorable *and* unique.
2525
data "null_data_source" "random_project_id" {
26-
inputs {
27-
value = "${format("%s-%s", data.null_data_source.project_prefix.outputs["value"], random_id.project_suffix.hex)}"
26+
inputs = {
27+
value = format(
28+
"%s-%s",
29+
data.null_data_source.project_prefix.outputs["value"],
30+
random_id.project_suffix.hex,
31+
)
2832
}
2933
}
3034

3135
// Build a custom ID.
3236
data "null_data_source" "custom_project_id" {
33-
inputs {
34-
value = "${data.null_data_source.project_prefix.outputs["value"] == "" ? var.custom_id : format("%s-%s", data.null_data_source.project_prefix.outputs["value"], var.custom_id)}"
37+
inputs = {
38+
value = data.null_data_source.project_prefix.outputs["value"] == "" ? var.custom_id : format(
39+
"%s-%s",
40+
data.null_data_source.project_prefix.outputs["value"],
41+
var.custom_id,
42+
)
3543
}
3644
}
3745

3846
// Return the correct project ID—a non-empty custom ID takes precedence.
3947
data "null_data_source" "project_id" {
40-
inputs {
41-
value = "${var.custom_id == "" ? data.null_data_source.random_project_id.outputs["value"] : data.null_data_source.custom_project_id.outputs["value"]}"
48+
inputs = {
49+
value = var.custom_id == "" ? data.null_data_source.random_project_id.outputs["value"] : data.null_data_source.custom_project_id.outputs["value"]
4250
}
4351
}
4452

4553
// Random project name if one wasn't specified already.
4654
data "null_data_source" "project_name" {
47-
inputs {
48-
value = "${var.display_name == "" ? title(join(" ", slice(split("-", data.null_data_source.project_id.outputs["value"]), 0, 2))) : var.display_name}"
55+
inputs = {
56+
value = var.display_name == "" ? title(
57+
join(
58+
" ",
59+
slice(
60+
split("-", data.null_data_source.project_id.outputs["value"]),
61+
0,
62+
2,
63+
),
64+
),
65+
) : var.display_name
4966
}
5067
}
5168

5269
// Fetch information about the organization.
5370
data "google_organization" "details" {
54-
organization = "${var.organization_id}"
71+
organization = var.organization_id
5572
}
5673

5774
// Fetch information about the project's default service account.
5875
data "google_compute_default_service_account" "details" {
59-
project = "${google_project.project.id}"
76+
project = google_project.project.id
6077
}
78+

locals.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
locals {
2-
project_id = "${data.null_data_source.project_id.outputs["value"]}"
3-
project_name = "${data.null_data_source.project_name.outputs["value"]}"
2+
project_id = data.null_data_source.project_id.outputs["value"]
3+
project_name = data.null_data_source.project_name.outputs["value"]
44
}
5+

0 commit comments

Comments
 (0)