Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cfnet url #5745

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/8113.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
cloudfunctions2: added `url` output field to `google_cloudfunctions2_function`
```
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ timeout period. Defaults to 60 seconds.`,
Computed: true,
Description: `The last update timestamp of a Cloud Function.`,
},
"url": {
Type: schema.TypeString,
Computed: true,
Description: `Output only. The deployed url for the function.`,
},
"project": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -657,6 +662,9 @@ func resourceCloudfunctions2functionRead(d *schema.ResourceData, meta interface{
if err := d.Set("environment", flattenCloudfunctions2functionEnvironment(res["environment"], d, config)); err != nil {
return fmt.Errorf("Error reading function: %s", err)
}
if err := d.Set("url", flattenCloudfunctions2functionUrl(res["url"], d, config)); err != nil {
return fmt.Errorf("Error reading function: %s", err)
}
if err := d.Set("state", flattenCloudfunctions2functionState(res["state"], d, config)); err != nil {
return fmt.Errorf("Error reading function: %s", err)
}
Expand Down Expand Up @@ -880,6 +888,10 @@ func flattenCloudfunctions2functionEnvironment(v interface{}, d *schema.Resource
return v
}

func flattenCloudfunctions2functionUrl(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenCloudfunctions2functionState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/cloudfunctions2_function.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,9 @@ In addition to the arguments listed above, the following computed attributes are
* `environment` -
The environment the function is hosted on.

* `url` -
Output only. The deployed url for the function.

* `state` -
Describes the current state of the function.

Expand Down