Skip to content

Commit

Permalink
chore: upgraded versions.tf to include minor bumps from tpg v5 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-awmalik authored Oct 31, 2023
1 parent 58a3e1b commit 7b96d49
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.13
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.17
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,46 @@ module "gce-ilb" {
]
}
```
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| all\_ports | Boolean for all\_ports setting on forwarding rule. | `bool` | `null` | no |
| backends | List of backends, should be a map of key-value pairs for each backend, must have the 'group' key. | `list(any)` | n/a | yes |
| connection\_draining\_timeout\_sec | Time for which instance will be drained | `number` | `null` | no |
| create\_backend\_firewall | Controls if firewall rules for the backends will be created or not. Health-check firewall rules are controlled separately. | `bool` | `true` | no |
| create\_health\_check\_firewall | Controls if firewall rules for the health check will be created or not. If this rule is not present backend healthcheck will fail. | `bool` | `true` | no |
| firewall\_enable\_logging | Controls if firewall rules that are created are to have logging configured. This will be ignored for firewall rules that are not created. | `bool` | `false` | no |
| global\_access | Allow all regions on the same VPC network access. | `bool` | `false` | no |
| health\_check | Health check to determine whether instances are responsive and able to do work | <pre>object({<br> type = string<br> check_interval_sec = number<br> healthy_threshold = number<br> timeout_sec = number<br> unhealthy_threshold = number<br> response = string<br> proxy_header = string<br> port = number<br> port_name = string<br> request = string<br> request_path = string<br> host = string<br> enable_log = bool<br> })</pre> | n/a | yes |
| ip\_address | IP address of the internal load balancer, if empty one will be assigned. Default is empty. | `string` | `null` | no |
| ip\_protocol | The IP protocol for the backend and frontend forwarding rule. TCP or UDP. | `string` | `"TCP"` | no |
| labels | The labels to attach to resources created by this module. | `map(string)` | `{}` | no |
| name | Name for the forwarding rule and prefix for supporting resources. | `string` | n/a | yes |
| network | Name of the network to create resources in. | `string` | `"default"` | no |
| network\_project | Name of the project for the network. Useful for shared VPC. Default is var.project. | `string` | `""` | no |
| ports | List of ports range to forward to backend services. Max is 5. | `list(string)` | n/a | yes |
| project | The project to deploy to, if not set the default provider project is used. | `string` | `""` | no |
| region | Region for cloud resources. | `string` | `"us-central1"` | no |
| service\_label | Service label is used to create internal DNS name | `string` | `null` | no |
| session\_affinity | The session affinity for the backends example: NONE, CLIENT\_IP. Default is `NONE`. | `string` | `"NONE"` | no |
| source\_ip\_ranges | List of source ip ranges for traffic between the internal load balancer. | `list(string)` | `null` | no |
| source\_service\_accounts | List of source service accounts for traffic between the internal load balancer. | `list(string)` | `null` | no |
| source\_tags | List of source tags for traffic between the internal load balancer. | `list(string)` | n/a | yes |
| subnetwork | Name of the subnetwork to create resources in. | `string` | `"default"` | no |
| target\_service\_accounts | List of target service accounts for traffic between the internal load balancer. | `list(string)` | `null` | no |
| target\_tags | List of target tags for traffic between the internal load balancer. | `list(string)` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| forwarding\_rule | The forwarding rule self\_link. |
| forwarding\_rule\_id | The forwarding rule id. |
| ip\_address | The internal IP assigned to the regional forwarding rule. |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Resources created

Expand Down
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.13'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.17'
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.13'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.17'
16 changes: 16 additions & 0 deletions examples/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ the [gcloud compute backend-services
add-backend](https://cloud.google.com/sdk/gcloud/reference/compute/backend-services/add-backend)
command.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| project\_id | The project to create test resources within. | `string` | n/a | yes |
| region | Region for cloud resources. | `string` | `"us-central1"` | no |

## Outputs

| Name | Description |
|------|-------------|
| random\_suffix | A random string generated by terraform to append to resource names. This helps avoid name collisions and the test suite consumes this value. |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Change to the example directory

```
Expand Down
33 changes: 0 additions & 33 deletions examples/minimal/versions.tf

This file was deleted.

18 changes: 18 additions & 0 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ This example creates 3 instance groups. The first group is in us-central1-b and

![architecture diagram](./diagram.png)

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| network | Name of the network to create resources in. | `string` | n/a | yes |
| project | The project id to deploy to | `string` | n/a | yes |
| region | Region for cloud resources. | `string` | n/a | yes |
| service\_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account | <pre>object({<br> email = string<br> scopes = set(string)<br> })</pre> | n/a | yes |
| subnetwork | Name of the subnetwork to create resources in. | `string` | n/a | yes |
| subnetwork\_project | Name of the project for the subnetwork. Useful for shared VPC. | `string` | n/a | yes |

## Outputs

No outputs.

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Set up the environment

```shell
Expand Down
33 changes: 0 additions & 33 deletions examples/simple/versions.tf

This file was deleted.

2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "google_compute_region_backend_service" "default" {
failover = lookup(backend.value, "failover", null)
}
}
health_checks = concat(google_compute_health_check.tcp.*.self_link, google_compute_health_check.http.*.self_link, google_compute_health_check.https.*.self_link)
health_checks = concat(google_compute_health_check.tcp[*].self_link, google_compute_health_check.http[*].self_link, google_compute_health_check.https[*].self_link)
}

resource "google_compute_health_check" "tcp" {
Expand Down
4 changes: 2 additions & 2 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.26"
version = "< 6"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.26"
version = "< 6"
}
}
}
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.26, < 5.0"
version = ">= 4.26, < 6"
}

google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.26, < 5.0"
version = ">= 4.26, < 6"
}
}

Expand Down

0 comments on commit 7b96d49

Please sign in to comment.