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

cloudfunctions_function: vpc_connector not updated in-place #5811

Closed
dsludwig opened this issue Mar 2, 2020 · 1 comment · Fixed by GoogleCloudPlatform/magic-modules#3211, #5829 or hashicorp/terraform-provider-google-beta#1825
Assignees
Labels
bug forward/review In review; remove label to forward service/cloudfunctions

Comments

@dsludwig
Copy link

dsludwig commented Mar 2, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.12.19
+ provider.archive v1.3.0
+ provider.external v1.2.0
+ provider.google v3.10.0
+ provider.google-beta v3.10.0

Affected Resource(s)

  • google_cloudfunctions_function

Terraform Configuration Files

Before:

resource "google_cloudfunctions_function" "my_function" {
  provider = google-beta
  name        = "my_function"
  entry_point = "my_function"

  source_archive_bucket = "my_bucket"
  source_archive_object = "my_code.zip"

  runtime             = "python37"

  trigger_http = "true"
}

After:

resource "google_cloudfunctions_function" "my_function" {
  provider = google-beta
  name        = "my_function"
  entry_point = "my_function"

  source_archive_bucket = "my_bucket"
  source_archive_object = "my_code.zip"

  runtime             = "python37"
  vpc_connector       = "projects/my-project/locations/us-central1/connectors/myconn"

  trigger_http = "true"
}

Debug Output

2020-03-02T14:41:40.339-0800 [DEBUG] plugin.terraform-provider-google-beta_v3.10.0_x5: 2020/03/02 14:41:40 [DEBUG] Send Patch CloudFunction Configuration request: cloudfunctions.CloudFunction{AvailableMemoryMb:0, Description:"", EntryPoint:"", EnvironmentVariables:map[string]string{}, EventTrigger:(*cloudfunctions.EventTrigger)(nil), HttpsTrigger:(*cloudfunctions.HttpsTrigger)(nil), IngressSettings:"", Labels:map[string]string{}, MaxInstances:0, Name:"projects/my-project/locations/us-central1/functions/my_function", Network:"", Runtime:"", ServiceAccountEmail:"", SourceArchiveUrl:"gs://my_bucket/my_code.zip", SourceRepository:(*cloudfunctions.SourceRepository)(nil), SourceUploadUrl:"", Status:"", Timeout:"", UpdateTime:"", VersionId:0, VpcConnector:"", VpcConnectorEgressSettings:"", ServerResponse:googleapi.ServerResponse{HTTPStatusCode:0, Header:http.Header(nil)}, ForceSendFields:[]string(nil), NullFields:[]string(nil)}

Panic Output

N/A

Expected Behavior

The vpc_connector attribute should have been updated when the new configuration was used.

Actual Behavior

The vpc_connector attribute was not updated. terraform taint and applying caused the resource to be recreated, and the attribute to be set.

Steps to Reproduce

  1. terraform apply
  2. Add vpc_connector
  3. terraform apply

Important Factoids

References

There is no reference to vpc_connector in resourceCloudFunctionsUpdate

@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
@github-actions github-actions bot added service/cloudfunctions forward/review In review; remove label to forward labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.