Skip to content

Commit

Permalink
Fix functions build_environment_variable updating (#5381) (#10447)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 29, 2021
1 parent 98d66cc commit 8c69e94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/5381.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
2 changes: 1 addition & 1 deletion google/resource_cloudfunctions_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func resourceCloudFunctionsUpdate(d *schema.ResourceData, meta interface{}) erro
}

if d.HasChange("build_environment_variables") {
function.EnvironmentVariables = expandEnvironmentVariables(d)
function.BuildEnvironmentVariables = expandBuildEnvironmentVariables(d)
updateMaskArr = append(updateMaskArr, "buildEnvironmentVariables")
}

Expand Down
6 changes: 3 additions & 3 deletions google/resource_cloudfunctions_function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ resource "google_cloudfunctions_function" "function" {
TEST_ENV_VARIABLE = "test-env-variable-value"
}
build_environment_variables = {
TEST_ENV_VARIABLE = "test-env-variable-value"
TEST_ENV_VARIABLE = "test-build-env-variable-value"
}
max_instances = 10
}
Expand Down Expand Up @@ -660,8 +660,8 @@ resource "google_cloudfunctions_function" "function" {
NEW_ENV_VARIABLE = "new-env-variable-value"
}
build_environment_variables = {
TEST_ENV_VARIABLE = "test-env-variable-value"
NEW_ENV_VARIABLE = "new-env-variable-value"
TEST_ENV_VARIABLE = "test-build-env-variable-value"
NEW_ENV_VARIABLE = "new-build-env-variable-value"
}
max_instances = 15
}
Expand Down

0 comments on commit 8c69e94

Please sign in to comment.