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: website/docs/r/cloudfunctions_function.html.markdown
+17-4
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,6 @@ The following arguments are supported:
50
50
51
51
*`name` - (Required) A user-defined name of the function. Function names must be unique globally.
52
52
53
-
*`source_archive_bucket` - (Required) The GCS bucket containing the zip archive which contains the function.
54
-
55
-
*`source_archive_object` - (Required) The source archive object (file) in archive bucket.
56
-
57
53
- - -
58
54
59
55
*`description` - (Optional) Description of the function.
@@ -74,6 +70,13 @@ The following arguments are supported:
74
70
75
71
*`environment_variables` - (Optional) A set of key/value environment variable pairs to assign to the function.
76
72
73
+
*`source_archive_bucket` - (Optional) The GCS bucket containing the zip archive which contains the function.
74
+
75
+
*`source_archive_object` - (Optional) The source archive object (file) in archive bucket.
76
+
77
+
*`source_repository` - (Optional) Represents parameters related to source repository where a function is hosted.
78
+
Cannot be set alongside `source_archive_bucket` or `source_archive_object`. Structure is documented below.
79
+
77
80
The `event_trigger` block supports:
78
81
79
82
*`event_type` - (Required) The type of event to observe. For example: `"google.storage.object.finalize"`.
@@ -90,13 +93,23 @@ The `failure_policy` block supports:
90
93
91
94
*`retry` - (Required) Whether the function should be retried on failure. Defaults to `false`.
92
95
96
+
The `source_reposoitory` block supports:
97
+
98
+
*`url` - (Required) The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:
99
+
100
+
* To refer to a specific commit: `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
101
+
* To refer to a moveable alias (branch): `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`. To refer to HEAD, use the `master` moveable alias.
102
+
* To refer to a specific fixed alias (tag): `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
103
+
93
104
## Attributes Reference
94
105
95
106
In addition to the arguments listed above, the following computed attributes are
96
107
exported:
97
108
98
109
*`https_trigger_url` - URL which triggers function execution. Returned only if `trigger_http` is used.
99
110
111
+
*`source_reposoitory.0.deployed_url` - The URL pointing to the hosted repository where the function was defined at the time of deployment.
112
+
100
113
*`project` - Project of the function. If it is not provided, the provider project is used.
101
114
102
115
*`region` - Region of function. Currently can be only "us-central1". If it is not provided, the provider region is used.
0 commit comments