Skip to content

Commit b9b7003

Browse files
chore: update tests to use 1.0 image and update compat note (#72)
Co-authored-by: Morgante Pell <morgantep@google.com>
1 parent f3559b4 commit b9b7003

File tree

7 files changed

+65
-31
lines changed

7 files changed

+65
-31
lines changed

.github/release-please.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
releaseType: terraform-module
216
handleGHRelease: true

.github/workflows/stale.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: "Close stale issues"
216
on:
317
schedule:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ examples/dynamic-files/function_source/terraform_created_file.txt
5656

5757
node_modules
5858
yarn.lock
59+
60+
# tf lock file
61+
.terraform.lock.hcl

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.0
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

README.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ configures a function sourced from a Cloud Source Repositories
1414
repository.
1515

1616
## Compatibility
17-
This module is meant for use with Terraform 0.13. If you haven't
18-
[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
17+
This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+.
18+
If you find incompatibilities using Terraform `>=0.13`, please open an issue.
19+
20+
If you haven't [upgraded][terraform-0.13-upgrade] and need a Terraform
1921
0.12.x-compatible version of this module, the last released version
2022
intended for Terraform 0.12.x is [v1.5.0](https://registry.terraform.io/modules/terraform-google-modules/-event-function/google/v1.5.0).
2123

@@ -50,32 +52,32 @@ module "localhost_function" {
5052
## Inputs
5153

5254
| Name | Description | Type | Default | Required |
53-
|------|-------------|:----:|:-----:|:-----:|
54-
| available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | number | `"256"` | no |
55-
| bucket\_force\_destroy | When deleting the GCS bucket containing the cloud function, delete all objects in the bucket first. | bool | `"false"` | no |
56-
| bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. | map(string) | `<map>` | no |
57-
| bucket\_name | The name to apply to the bucket. Will default to a string of the function name. | string | `""` | no |
58-
| create\_bucket | Whether to create a new bucket or use an existing one. If false, `bucket_name` should reference the name of the alternate bucket to use. | bool | `"true"` | no |
59-
| description | The description of the function. | string | `"Processes events."` | no |
60-
| entry\_point | The name of a method in the function source which will be invoked when the function is executed. | string | n/a | yes |
61-
| environment\_variables | A set of key/value environment variable pairs to assign to the function. | map(string) | `<map>` | no |
62-
| event\_trigger | A source that fires events in response to a condition in another service. | map(string) | `<map>` | no |
63-
| event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | bool | `"false"` | no |
64-
| files\_to\_exclude\_in\_source\_dir | Specify files to ignore when reading the source_dir | list(string) | `<list>` | no |
65-
| ingress\_settings | The ingress settings for the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function. | string | `"ALLOW_ALL"` | no |
66-
| labels | A set of key/value label pairs to assign to the Cloud Function. | map(string) | `<map>` | no |
67-
| max\_instances | The maximum number of parallel executions of the function. | number | `"0"` | no |
68-
| name | The name to apply to any nameable resources. | string | n/a | yes |
69-
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes |
70-
| region | The region in which resources will be applied. | string | n/a | yes |
71-
| runtime | The runtime in which the function will be executed. | string | n/a | yes |
72-
| service\_account\_email | The service account to run the function as. | string | `""` | no |
73-
| source\_dependent\_files | A list of any Terraform created `local_file`s that the module will wait for before creating the archive. | object | `<list>` | no |
74-
| source\_directory | The pathname of the directory which contains the function source code. | string | n/a | yes |
75-
| timeout\_s | The amount of time in seconds allotted for the execution of the function. | number | `"60"` | no |
76-
| trigger\_http | Wheter to use HTTP trigger instead of the event trigger. | bool | `"null"` | no |
77-
| vpc\_connector | The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*. | string | `"null"` | no |
78-
| vpc\_connector\_egress\_settings | The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value. | string | `"null"` | no |
55+
|------|-------------|------|---------|:--------:|
56+
| available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | `number` | `256` | no |
57+
| bucket\_force\_destroy | When deleting the GCS bucket containing the cloud function, delete all objects in the bucket first. | `bool` | `false` | no |
58+
| bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. | `map(string)` | `{}` | no |
59+
| bucket\_name | The name to apply to the bucket. Will default to a string of the function name. | `string` | `""` | no |
60+
| create\_bucket | Whether to create a new bucket or use an existing one. If false, `bucket_name` should reference the name of the alternate bucket to use. | `bool` | `true` | no |
61+
| description | The description of the function. | `string` | `"Processes events."` | no |
62+
| entry\_point | The name of a method in the function source which will be invoked when the function is executed. | `string` | n/a | yes |
63+
| environment\_variables | A set of key/value environment variable pairs to assign to the function. | `map(string)` | `{}` | no |
64+
| event\_trigger | A source that fires events in response to a condition in another service. | `map(string)` | `{}` | no |
65+
| event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | `bool` | `false` | no |
66+
| files\_to\_exclude\_in\_source\_dir | Specify files to ignore when reading the source\_dir | `list(string)` | `[]` | no |
67+
| ingress\_settings | The ingress settings for the function. Allowed values are ALLOW\_ALL, ALLOW\_INTERNAL\_AND\_GCLB and ALLOW\_INTERNAL\_ONLY. Changes to this field will recreate the cloud function. | `string` | `"ALLOW_ALL"` | no |
68+
| labels | A set of key/value label pairs to assign to the Cloud Function. | `map(string)` | `{}` | no |
69+
| max\_instances | The maximum number of parallel executions of the function. | `number` | `0` | no |
70+
| name | The name to apply to any nameable resources. | `string` | n/a | yes |
71+
| project\_id | The ID of the project to which resources will be applied. | `string` | n/a | yes |
72+
| region | The region in which resources will be applied. | `string` | n/a | yes |
73+
| runtime | The runtime in which the function will be executed. | `string` | n/a | yes |
74+
| service\_account\_email | The service account to run the function as. | `string` | `""` | no |
75+
| source\_dependent\_files | A list of any Terraform created `local_file`s that the module will wait for before creating the archive. | <pre>list(object({<br> filename = string<br> id = string<br> }))</pre> | `[]` | no |
76+
| source\_directory | The pathname of the directory which contains the function source code. | `string` | n/a | yes |
77+
| timeout\_s | The amount of time in seconds allotted for the execution of the function. | `number` | `60` | no |
78+
| trigger\_http | Wheter to use HTTP trigger instead of the event trigger. | `bool` | `null` | no |
79+
| vpc\_connector | The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/\*/locations/\*/connectors/\*. | `string` | `null` | no |
80+
| vpc\_connector\_egress\_settings | The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL\_TRAFFIC and PRIVATE\_RANGES\_ONLY. If unset, this field preserves the previously set value. | `string` | `null` | no |
7981

8082
## Outputs
8183

@@ -131,3 +133,4 @@ information on contributing to this module.
131133
[project-factory-module-site]: https://github.com/terraform-google-modules/terraform-google-project-factory/
132134
[terraform-provider-gcp-site]: https://github.com/terraform-providers/terraform-provider-google/
133135
[terraform-site]: https://www.terraform.io/
136+
[terraform-0.13-upgrade]: https://www.terraform.io/upgrade-guides/0-13.html

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ tags:
3838
- 'integration'
3939
substitutions:
4040
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
41-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
41+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'

0 commit comments

Comments
 (0)