You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-32Lines changed: 31 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,10 @@
3
3
This modules makes it easy to set up a scheduled job to trigger events/run functions.
4
4
5
5
## Compatibility
6
-
7
-
This module is meant for use with Terraform 0.12. If you haven't
8
-
[upgraded](https://www.terraform.io/upgrade-guides/0-12.html) and need a Terraform 0.11.x-compatible
9
-
version of this module, the last released version intended for Terraform 0.11.x
10
-
is [v0.4.1](https://registry.terraform.io/modules/terraform-google-modules/scheduled-function/google/0.4.1).
6
+
This module is meant for use with Terraform 0.13. If you haven't
7
+
[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
8
+
0.12.x-compatible version of this module, the last released version
9
+
intended for Terraform 0.12.x is [v1.5.1](https://registry.terraform.io/modules/terraform-google-modules/-scheduled-function/google/v1.5.1).
11
10
12
11
## Usage
13
12
You can go to the examples folder, however the usage of the module could be like this in your own main.tf file:
@@ -37,32 +36,32 @@ Then perform the following commands on the root folder:
37
36
## Inputs
38
37
39
38
| Name | Description | Type | Default | Required |
40
-
|------|-------------|:----:|:-----:|:-----:|
41
-
| bucket\_force\_destroy | When deleting the GCS bucket containing the cloud function, delete all objects in the bucket first. | bool |`"true"`| no |
42
-
| bucket\_name | The name to apply to the bucket. Will default to a string of <project-id>-scheduled-function-XXXX> with XXXX being random characters. | string |`""`| no |
43
-
| function\_available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | number |`"256"`| no |
44
-
| function\_description | The description of the function. | string |`"Processes log export events provided through a Pub/Sub topic subscription."`| no |
45
-
| function\_entry\_point | The name of a method in the function source which will be invoked when the function is executed. | string | n/a | yes |
46
-
| function\_environment\_variables | A set of key/value environment variable pairs to assign to the function. | map(string) |`<map>`| no |
47
-
| function\_event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | bool |`"false"`| no |
48
-
| function\_labels | A set of key/value label pairs to assign to the function. | map(string) |`<map>`| no |
49
-
| function\_name | The name to apply to the function | string | n/a | yes |
50
-
| function\_runtime | The runtime in which the function will be executed. | string |`"nodejs10"`| no |
51
-
| function\_service\_account\_email | The service account to run the function as. | string |`""`| no |
52
-
| function\_source\_archive\_bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. | map(string) |`<map>`| no |
53
-
| function\_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 |
54
-
| function\_source\_directory | The contents of this directory will be archived and used as the function source. | string | n/a | yes |
55
-
| function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. | number |`"60"`| no |
56
-
| grant\_token\_creator | Specify true if you want to add token creator role to the default Pub/Sub SA | bool |`"false"`| no |
57
-
| job\_description | Addition text to describe the job | string |`""`| no |
58
-
| job\_name | The name of the scheduled job to run | string |`"null"`| no |
59
-
| job\_schedule | The job frequency, in cron syntax | string |`"*/2 * * * *"`| no |
60
-
| message\_data | The data to send in the topic message. | string |`"dGVzdA=="`| no |
61
-
| project\_id | The ID of the project where the resources will be created | string | n/a | yes |
62
-
| region | The region in which resources will be applied. | string | n/a | yes |
63
-
| scheduler\_job | An existing Cloud Scheduler job instance | object|`"null"`| no |
64
-
| time\_zone | The timezone to use in scheduler | string |`"Etc/UTC"`| no |
65
-
| topic\_name | Name of pubsub topic connecting the scheduled job and the function | string |`"test-topic"`| no |
| bucket\_force\_destroy | When deleting the GCS bucket containing the cloud function, delete all objects in the bucket first. |`bool`|`true`| no |
41
+
| bucket\_name | The name to apply to the bucket. Will default to a string of <project-id>-scheduled-function-XXXX> with XXXX being random characters. |`string`|`""`| no |
42
+
| function\_available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. |`number`|`256`| no |
43
+
| function\_description | The description of the function. |`string`|`"Processes log export events provided through a Pub/Sub topic subscription."`| no |
44
+
| function\_entry\_point | The name of a method in the function source which will be invoked when the function is executed. |`string`| n/a | yes |
45
+
| function\_environment\_variables | A set of key/value environment variable pairs to assign to the function. |`map(string)`|`{}`| no |
46
+
| function\_event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. |`bool`|`false`| no |
47
+
| function\_labels | A set of key/value label pairs to assign to the function. |`map(string)`|`{}`| no |
48
+
| function\_name | The name to apply to the function |`string`| n/a | yes |
49
+
| function\_runtime | The runtime in which the function will be executed. |`string`|`"nodejs10"`| no |
50
+
| function\_service\_account\_email | The service account to run the function as. |`string`|`""`| no |
51
+
| function\_source\_archive\_bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. |`map(string)`|`{}`| no |
52
+
| function\_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 |
53
+
| function\_source\_directory | The contents of this directory will be archived and used as the function source. |`string`| n/a | yes |
54
+
| function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. |`number`|`60`| no |
55
+
| grant\_token\_creator | Specify true if you want to add token creator role to the default Pub/Sub SA |`bool`|`false`| no |
56
+
| job\_description | Addition text to describe the job |`string`|`""`| no |
57
+
| job\_name | The name of the scheduled job to run |`string`|`null`| no |
58
+
| job\_schedule | The job frequency, in cron syntax |`string`|`"*/2 * * * *"`| no |
59
+
| message\_data | The data to send in the topic message. |`string`|`"dGVzdA=="`| no |
60
+
| project\_id | The ID of the project where the resources will be created |`string`| n/a | yes |
61
+
| region | The region in which resources will be applied. |`string`| n/a | yes |
62
+
| scheduler\_job | An existing Cloud Scheduler job instance |`object({ name = string })`|`null`| no |
63
+
| time\_zone | The timezone to use in scheduler |`string`|`"Etc/UTC"`| no |
64
+
| topic\_name | Name of pubsub topic connecting the scheduled job and the function |`string`|`"test-topic"`| no |
66
65
67
66
## Outputs
68
67
@@ -82,7 +81,7 @@ These sections describe requirements for using this module.
Copy file name to clipboardExpand all lines: modules/project_cleanup/README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,19 @@ The following services must be enabled on the project housing the cleanup functi
20
20
## Inputs
21
21
22
22
| Name | Description | Type | Default | Required |
23
-
|------|-------------|:----:|:-----:|:-----:|
24
-
| function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. | number |`"500"`| no |
25
-
| job\_schedule | Cleaner function run frequency, in cron syntax | string |`"*/5 * * * *"`| no |
26
-
| max\_project\_age\_in\_hours | The maximum number of hours that a GCP project, selected by `target_tag_name` and `target_tag_value`, can exist | number |`"6"`| no |
27
-
| organization\_id | The organization ID whose projects to clean up | string | n/a | yes |
28
-
| project\_id | The project ID to host the scheduled function in | string | n/a | yes |
29
-
| region | The region the project is in (App Engine specific) | string | n/a | yes |
30
-
| target\_excluded\_labels | Map of project lablels that won't be deleted. | map(string) |`<map>`| no |
31
-
| target\_folder\_id | Folder ID to delete all projects under. | string |`""`| no |
32
-
| target\_included\_labels | Map of project lablels that will be deleted. | map(string) |`<map>`| no |
33
-
| target\_tag\_name | The name of a tag to filter GCP projects on for consideration by the cleanup utility (legacy, use `target_included_labels` map instead). | string |`""`| no |
34
-
| target\_tag\_value | The value of a tag to filter GCP projects on for consideration by the cleanup utility (legacy, use `target_included_labels` map instead). | string |`""`| no |
35
-
| topic\_name | Name of pubsub topic connecting the scheduled projects cleanup function | string |`"pubsub_scheduled_project_cleaner"`| no |
| function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. |`number`|`500`| no |
25
+
| job\_schedule | Cleaner function run frequency, in cron syntax |`string`|`"*/5 * * * *"`| no |
26
+
| max\_project\_age\_in\_hours | The maximum number of hours that a GCP project, selected by `target_tag_name` and `target_tag_value`, can exist |`number`|`6`| no |
27
+
| organization\_id | The organization ID whose projects to clean up |`string`| n/a | yes |
28
+
| project\_id | The project ID to host the scheduled function in |`string`| n/a | yes |
29
+
| region | The region the project is in (App Engine specific) |`string`| n/a | yes |
30
+
| target\_excluded\_labels | Map of project lablels that won't be deleted. |`map(string)`|`{}`| no |
31
+
| target\_folder\_id | Folder ID to delete all projects under. |`string`|`""`| no |
32
+
| target\_included\_labels | Map of project lablels that will be deleted. |`map(string)`|`{}`| no |
33
+
| target\_tag\_name | The name of a tag to filter GCP projects on for consideration by the cleanup utility (legacy, use `target_included_labels` map instead). |`string`|`""`| no |
34
+
| target\_tag\_value | The value of a tag to filter GCP projects on for consideration by the cleanup utility (legacy, use `target_included_labels` map instead). |`string`|`""`| no |
35
+
| topic\_name | Name of pubsub topic connecting the scheduled projects cleanup function |`string`|`"pubsub_scheduled_project_cleaner"`| no |
0 commit comments