Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project_factory: added bucket_location property #207

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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ determining that location is as follows:
| activate\_apis | The list of apis to activate within the project | list | `<list>` | no |
| auto\_create\_network | Create the default network | string | `"false"` | no |
| billing\_account | The ID of the billing account to associate this project with | string | n/a | yes |
| bucket\_location | The location for a GCS bucket to create (optional) | string | `"US"` | no |
| bucket\_name | A name for a GCS bucket to create (in the bucket_project project), useful for Terraform state (optional) | string | `""` | no |
| bucket\_project | A project to create a GCS bucket (bucket_name) in, useful for Terraform state (optional) | string | `""` | no |
| credentials\_path | Path to a service account credentials file with rights to run the Project Factory. If this file is absent Terraform will fall back to Application Default Credentials. | string | `""` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module "project-factory" {
labels = "${var.labels}"
bucket_project = "${var.bucket_project}"
bucket_name = "${var.bucket_name}"
bucket_location = "${var.bucket_location}"
auto_create_network = "${var.auto_create_network}"
disable_services_on_destroy = "${var.disable_services_on_destroy}"
default_service_account = "${var.default_service_account}"
Expand Down
6 changes: 3 additions & 3 deletions modules/fabric-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ module "project_myproject" {

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| name | Project name and id suffix. | string | n/a | yes |
| parent\_id | Id of the resource under which the folder will be placed. | string | n/a | yes |
| prefix | Prefix used to generate project id and name | string | n/a | yes |
| activate\_apis | Service APIs to enable. | list | `<list>` | no |
| auto\_create\_network | Whether to create the default network for the project | string | `"false"` | no |
| billing\_account | Billing account id. | string | `""` | no |
Expand All @@ -49,11 +46,14 @@ module "project_myproject" {
| gce\_service\_account\_roles | List of project id=>role to assign to the default GCE service account. | list | `<list>` | no |
| labels | Resource labels. | map | `<map>` | no |
| lien\_reason | If non-empty, creates a project lien with this description. | string | `""` | no |
| name | Project name and id suffix. | string | n/a | yes |
| oslogin | Enable oslogin. | string | `"false"` | no |
| oslogin\_admins | List of IAM-format members that will get OS Login admin role. | list | `<list>` | no |
| oslogin\_users | List of IAM-format members that will get OS Login user role. | list | `<list>` | no |
| owners | Optional list of IAM-format members to set as project owners. | list | `<list>` | no |
| parent\_id | Id of the resource under which the folder will be placed. | string | n/a | yes |
| parent\_type | Type of the parent resource, defaults to organization. | string | `"organization"` | no |
| prefix | Prefix used to generate project id and name | string | n/a | yes |
| viewers | Optional list of IAM-format members to set as project viewers. | list | `<list>` | no |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions modules/gsuite_enabled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The roles granted are specifically:
| api\_sa\_group | A GSuite group to place the Google APIs Service Account for the project in | string | `""` | no |
| auto\_create\_network | Create the default network | string | `"false"` | no |
| billing\_account | The ID of the billing account to associate this project with | string | n/a | yes |
| bucket\_location | The location for a GCS bucket to create (optional) | string | `""` | no |
| bucket\_name | A name for a GCS bucket to create (in the bucket_project project), useful for Terraform state (optional) | string | `""` | no |
| bucket\_project | A project to create a GCS bucket (bucket_name) in, useful for Terraform state (optional) | string | `""` | no |
| create\_group | Whether to create the group or not | string | `"false"` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/gsuite_enabled/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module "project-factory" {
labels = "${var.labels}"
bucket_project = "${var.bucket_project}"
bucket_name = "${var.bucket_name}"
bucket_location = "${var.bucket_location}"
auto_create_network = "${var.auto_create_network}"
disable_services_on_destroy = "${var.disable_services_on_destroy}"
default_service_account = "${var.default_service_account}"
Expand Down
5 changes: 5 additions & 0 deletions modules/gsuite_enabled/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ variable "bucket_name" {
default = ""
}

variable "bucket_location" {
description = "The location for a GCS bucket to create (optional)"
default = ""
}

variable "api_sa_group" {
description = "A GSuite group to place the Google APIs Service Account for the project in"
default = ""
Expand Down
6 changes: 4 additions & 2 deletions test/fixtures/full/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
| sa\_role | |
| service\_account\_email | |
| shared\_vpc | |
| shared\_vpc\_subnet\_name | |
| shared\_vpc\_subnet\_region | |
| shared\_vpc\_subnet\_name\_01 | |
| shared\_vpc\_subnet\_name\_02 | |
| shared\_vpc\_subnet\_region\_01 | |
| shared\_vpc\_subnet\_region\_02 | |
| usage\_bucket\_name | |
| usage\_bucket\_prefix | |

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ variable "bucket_name" {
default = ""
}

variable "bucket_location" {
description = "The location for a GCS bucket to create (optional)"
default = "US"
}

variable "auto_create_network" {
description = "Create the default network"
default = "false"
Expand Down