Open preston-hf opened 4 years ago
With request/response i see sourceArchiveUrl has been used.
terraform version
+ provider.google v3.17.0
+ provider.google-beta v2.19.0
Request
{
"availableMemoryMb": 128,
"description": "My function",
"entryPoint": "HelloWorld",
"httpsTrigger": {},
"ingressSettings": "ALLOW_ALL",
"name": "xxx/functions/fetch-prometheus-data",
"runtime": "go111",
"sourceArchiveUrl": "gs://source-code-prometheus-fetch-v/function_go.zip",
"timeout": "60s"
}
Response :
{
"name": "projects/xxx/locations/us-central1/functions/fetch-prometheus-data",
"description": "My function",
"sourceArchiveUrl": "gs://source-code-prometheus-fetch-v/function_go.zip",
"httpsTrigger": {
"url": "https://xxx/fetch-prometheus-data"
},
"status": "ACTIVE",
"entryPoint": "HelloWorld",
"timeout": "60s",
"availableMemoryMb": 128,
"serviceAccountEmail": "xxxx@appspot.gserviceaccount.com",
"updateTime": "2020-04-20T21:02:42.559Z",
"versionId": "1",
"runtime": "go111",
"ingressSettings": "ALLOW_ALL"
}
If you want to attach your debug log, i will have a look
@preston-hf do you still need help on this issue ? if not i will go head and close it
I've received a similar error when importing a gcloud cli deployed function & trying to change to source_archive_bucket & object
Error while updating cloudfunction configuration: googleapi: Error 400: Invalid value at 'function' (oneof), oneof field 'source_code' is already set. Cannot set 'sourceUploadUrl', invalid
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.12.23
Affected Resource(s)
Terraform Configuration Files
Debug Output
I can't post this for privacy reasons, but I can see the API response for the function returns the
sourceUploadUrl
which should be detected as a change since it originally wassourceArchiveUrl
Expected Behavior
Terraform should detect the drift from
sourceArchiveUrl
tosourceUploadUrl
Actual Behavior
Changes to source code are not detected
Steps to Reproduce
source_archive_bucket
andsource_archive_object
to specify function source, apply config successfully.gcloud app deploy <function name> --source .
or otherwise utilize the gcloud source upload functionalityterraform plan
, notice that no changes are detected. You may see that a label has been added but no changes will be detected to the source code.References
b/274818913