Skip to content

Commit

Permalink
fix: Upgrade project_services submodule to support 0.14. (#48)
Browse files Browse the repository at this point in the history
* Regenerate docs

* Fix lints

* verify_version: false

* driver

* remove legacy make_source
  • Loading branch information
morgante authored Mar 25, 2021
1 parent 1b1b340 commit 7ceff0f
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 126 deletions.
5 changes: 5 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
provisioner:
name: "terraform"

driver:
name: "terraform"
command_timeout: 1800
verify_version: false

platforms:
- name: local

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

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

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ module "memorystore" {
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| alternative\_location\_id | The alternative zone where the instance will be provisioned. | string | `"null"` | no |
| auth\_enabled | Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | bool | `"false"` | no |
| authorized\_network | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | string | `"null"` | no |
| connect\_mode | The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING. | string | `"null"` | no |
| display\_name | An arbitrary and optional user-provided name for the instance. | string | `"null"` | no |
| enable\_apis | Flag for enabling redis.googleapis.com in your project | bool | `"true"` | no |
| labels | The resource labels to represent user provided metadata. | map(string) | `"null"` | no |
| location\_id | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. | string | `"null"` | no |
| memory\_size\_gb | Redis memory size in GiB. Defaulted to 1 GiB | number | `"1"` | no |
| name | The ID of the instance or a fully qualified identifier for the instance. | string | n/a | yes |
| project | The ID of the project in which the resource belongs to. | string | n/a | yes |
| redis\_configs | The Redis configuration parameters. See [more details](https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs) | map(any) | `<map>` | no |
| redis\_version | The version of Redis software. | string | `"null"` | no |
| region | The GCP region to use. | string | `"null"` | no |
| reserved\_ip\_range | The CIDR range of internal addresses that are reserved for this instance. | string | `"null"` | no |
| tier | The service tier of the instance. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Tier | string | `"STANDARD_HA"` | no |
|------|-------------|------|---------|:--------:|
| alternative\_location\_id | The alternative zone where the instance will be provisioned. | `string` | `null` | no |
| auth\_enabled | Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | `bool` | `false` | no |
| authorized\_network | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | `string` | `null` | no |
| connect\_mode | The connection mode of the Redis instance. Can be either DIRECT\_PEERING or PRIVATE\_SERVICE\_ACCESS. The default connect mode if not provided is DIRECT\_PEERING. | `string` | `null` | no |
| display\_name | An arbitrary and optional user-provided name for the instance. | `string` | `null` | no |
| enable\_apis | Flag for enabling redis.googleapis.com in your project | `bool` | `true` | no |
| labels | The resource labels to represent user provided metadata. | `map(string)` | `null` | no |
| location\_id | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD\_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. | `string` | `null` | no |
| memory\_size\_gb | Redis memory size in GiB. Defaulted to 1 GiB | `number` | `1` | no |
| name | The ID of the instance or a fully qualified identifier for the instance. | `string` | n/a | yes |
| project | The ID of the project in which the resource belongs to. | `string` | n/a | yes |
| redis\_configs | The Redis configuration parameters. See [more details](https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs) | `map(any)` | `{}` | no |
| redis\_version | The version of Redis software. | `string` | `null` | no |
| region | The GCP region to use. | `string` | `null` | no |
| reserved\_ip\_range | The CIDR range of internal addresses that are reserved for this instance. | `string` | `null` | no |
| tier | The service tier of the instance. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Tier | `string` | `"STANDARD_HA"` | no |

## Outputs

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: '0.11.6'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.14'
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: '0.11.6'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.14'
1 change: 0 additions & 1 deletion examples/basic/memorystore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

provider "google" {
version = "~> 3.52.0"
}

module "memorystore" {
Expand Down
3 changes: 1 addition & 2 deletions examples/memcache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
*/

provider "google-beta" {
version = "~> 3.38.0"
}

module "private-service-access" {
source = "GoogleCloudPlatform/sql-db/google//modules/private_service_access"
version = "3.2.0"
version = "~> 4.5"
project_id = var.project
vpc_network = "default"
}
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "google_redis_instance" "default" {

module "enable_apis" {
source = "terraform-google-modules/project-factory/google//modules/project_services"
version = "9.2.0"
version = "~> 10.0"

project_id = var.project
enable_apis = var.enable_apis
Expand Down
28 changes: 14 additions & 14 deletions modules/memcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ A Terraform module for creating a fully functional Google Memorystore (memcache)
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| authorized\_network | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | string | `"null"` | no |
| cpu\_count | Number of CPUs per node | number | `"1"` | no |
| display\_name | An arbitrary and optional user-provided name for the instance. | string | `"null"` | no |
| enable\_apis | Flag for enabling memcache.googleapis.com in your project | bool | `"true"` | no |
| labels | The resource labels to represent user provided metadata. | map(string) | `<map>` | no |
| memory\_size\_mb | Memcache memory size in MiB. Defaulted to 1024 | number | `"1024"` | no |
| name | The ID of the instance or a fully qualified identifier for the instance. | string | n/a | yes |
| node\_count | Number of nodes in the memcache instance. | number | `"1"` | no |
| params | Parameters for the memcache process | map(string) | `"null"` | no |
| project | The ID of the project in which the resource belongs to. | string | n/a | yes |
| region | The GCP region to use. | string | n/a | yes |
| reserved\_ip\_range | The CIDR range of internal addresses that are reserved for this instance. | string | `"null"` | no |
| zones | Zones where memcache nodes should be provisioned. If not provided, all zones will be used. | list(string) | `"null"` | no |
|------|-------------|------|---------|:--------:|
| authorized\_network | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | `string` | `null` | no |
| cpu\_count | Number of CPUs per node | `number` | `1` | no |
| display\_name | An arbitrary and optional user-provided name for the instance. | `string` | `null` | no |
| enable\_apis | Flag for enabling memcache.googleapis.com in your project | `bool` | `true` | no |
| labels | The resource labels to represent user provided metadata. | `map(string)` | `{}` | no |
| memory\_size\_mb | Memcache memory size in MiB. Defaulted to 1024 | `number` | `1024` | no |
| name | The ID of the instance or a fully qualified identifier for the instance. | `string` | n/a | yes |
| node\_count | Number of nodes in the memcache instance. | `number` | `1` | no |
| params | Parameters for the memcache process | `map(string)` | `null` | no |
| project | The ID of the project in which the resource belongs to. | `string` | n/a | yes |
| region | The GCP region to use. | `string` | n/a | yes |
| reserved\_ip\_range | The CIDR range of internal addresses that are reserved for this instance. | `string` | `null` | no |
| zones | Zones where memcache nodes should be provisioned. If not provided, all zones will be used. | `list(string)` | `null` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion modules/memcache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "google_memcache_instance" "self" {

module "enable_apis" {
source = "terraform-google-modules/project-factory/google//modules/project_services"
version = "9.2.0"
version = "~> 10.0"

project_id = var.project
enable_apis = var.enable_apis
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/memcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ This test will create a new memcache instance.
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| project\_id | Google cloud project id to create memcache instance. | string | n/a | yes |
|------|-------------|------|---------|:--------:|
| project\_id | Google cloud project id to create memcache instance. | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| cpu\_count | |
| memory\_size\_mb | |
| name | |
| output\_id | |
| output\_region | |
| project\_id | |
| region | |
| cpu\_count | n/a |
| memory\_size\_mb | n/a |
| name | n/a |
| output\_id | n/a |
| output\_region | n/a |
| project\_id | n/a |
| region | n/a |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
4 changes: 0 additions & 4 deletions test/fixtures/memcache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

provider "google-beta" {
version = "~> 3.38.0"
}

module "memcache" {
source = "../../../examples/memcache"
project = var.project_id
Expand Down
32 changes: 16 additions & 16 deletions test/fixtures/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ This test will create a new redis instance.
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| location\_id | Zone to create test instance. | string | `"us-east1-b"` | no |
| memory\_size\_gb | Memory size of test instance. | number | `"1"` | no |
| name | Name of redis instance. | string | `"test-minimal"` | no |
| project\_id | Google cloud project id to create redis instance. | string | n/a | yes |
| region | Region to create test instance. | string | `"us-east1"` | no |
| tier | The service tier of the instance. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Tier | string | `"BASIC"` | no |
|------|-------------|------|---------|:--------:|
| location\_id | Zone to create test instance. | `string` | `"us-east1-b"` | no |
| memory\_size\_gb | Memory size of test instance. | `number` | `1` | no |
| name | Name of redis instance. | `string` | `"test-minimal"` | no |
| project\_id | Google cloud project id to create redis instance. | `string` | n/a | yes |
| region | Region to create test instance. | `string` | `"us-east1"` | no |
| tier | The service tier of the instance. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Tier | `string` | `"BASIC"` | no |

## Outputs

| Name | Description |
|------|-------------|
| location\_id | |
| memory\_size\_gb | |
| name | |
| output\_current\_location\_id | |
| output\_host | |
| output\_id | |
| output\_region | |
| project\_id | |
| region | |
| location\_id | n/a |
| memory\_size\_gb | n/a |
| name | n/a |
| output\_current\_location\_id | n/a |
| output\_host | n/a |
| output\_id | n/a |
| output\_region | n/a |
| project\_id | n/a |
| region | n/a |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
42 changes: 21 additions & 21 deletions test/fixtures/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ This test will create a new redis instance.
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| alternative\_location\_id | Alternate Zone to create test instance. | string | `"us-east1-d"` | no |
| auth\_enabled | Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | bool | `"true"` | no |
| auth\_string | AUTH String set on the instance. This field will only be populated if auth_enabled is true | string | `"null"` | no |
| location\_id | Zone to create test instance. | string | `"us-east1-b"` | no |
| memory\_size\_gb | Memory size of test instance. | number | `"1"` | no |
| name | Name of redis instance. | string | `"test-redis"` | no |
| project\_id | Google cloud project id to create redis instance. | string | n/a | yes |
| region | Region to create test instance. | string | `"us-east1"` | no |
|------|-------------|------|---------|:--------:|
| alternative\_location\_id | Alternate Zone to create test instance. | `string` | `"us-east1-d"` | no |
| auth\_enabled | Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | `bool` | `true` | no |
| auth\_string | AUTH String set on the instance. This field will only be populated if auth\_enabled is true | `string` | `null` | no |
| location\_id | Zone to create test instance. | `string` | `"us-east1-b"` | no |
| memory\_size\_gb | Memory size of test instance. | `number` | `1` | no |
| name | Name of redis instance. | `string` | `"test-redis"` | no |
| project\_id | Google cloud project id to create redis instance. | `string` | n/a | yes |
| region | Region to create test instance. | `string` | `"us-east1"` | no |

## Outputs

| Name | Description |
|------|-------------|
| alternative\_location\_id | |
| auth\_enabled | |
| auth\_string | |
| location\_id | |
| memory\_size\_gb | |
| name | |
| output\_current\_location\_id | |
| output\_host | |
| output\_id | |
| output\_region | |
| project\_id | |
| region | |
| alternative\_location\_id | n/a |
| auth\_enabled | n/a |
| auth\_string | n/a |
| location\_id | n/a |
| memory\_size\_gb | n/a |
| name | n/a |
| output\_current\_location\_id | n/a |
| output\_host | n/a |
| output\_id | n/a |
| output\_region | n/a |
| project\_id | n/a |
| region | n/a |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2 changes: 1 addition & 1 deletion test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module "project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 8.1.0"
version = "~> 10.2"

name = "ci-memory-store"
random_project_id = true
Expand Down
28 changes: 0 additions & 28 deletions test/setup/make_source.sh

This file was deleted.

8 changes: 0 additions & 8 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,3 @@
terraform {
required_version = ">= 0.12"
}

provider "google" {
version = "~> 3.52.0"
}

provider "google-beta" {
version = "~> 3.52.0"
}

0 comments on commit 7ceff0f

Please sign in to comment.