Skip to content

Commit

Permalink
Revert "Allow api_gateway_gateway to change" (hashicorp#4592) (hashic…
Browse files Browse the repository at this point in the history
…orp#3058)

This reverts commit 11c7a203155c56ac780f78a5c5b0dfc75877923c.

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 15, 2021
1 parent c3d0aba commit 1176430
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .changelog/4592.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none
Release note
```
11 changes: 1 addition & 10 deletions google-beta/resource_api_gateway_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func resourceApiGatewayGateway() *schema.Resource {
"api_config": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareResourceNames,
Description: `Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}`,
},
Expand Down Expand Up @@ -255,12 +256,6 @@ func resourceApiGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) e
} else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) {
obj["displayName"] = displayNameProp
}
apiConfigProp, err := expandApiGatewayGatewayApiConfig(d.Get("api_config"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("api_config"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, apiConfigProp)) {
obj["apiConfig"] = apiConfigProp
}
labelsProp, err := expandApiGatewayGatewayLabels(d.Get("labels"), d, config)
if err != nil {
return err
Expand All @@ -280,10 +275,6 @@ func resourceApiGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) e
updateMask = append(updateMask, "displayName")
}

if d.HasChange("api_config") {
updateMask = append(updateMask, "apiConfig")
}

if d.HasChange("labels") {
updateMask = append(updateMask, "labels")
}
Expand Down
2 changes: 1 addition & 1 deletion google-beta/resource_dataflow_flex_template_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
compute "google.golang.org/api/compute/v1"
"google.golang.org/api/compute/v1"
)

func TestAccDataflowFlexTemplateJob_basic(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions google-beta/resource_dataproc_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"

"google.golang.org/api/googleapi"

dataproc "google.golang.org/api/dataproc/v1beta2"
"google.golang.org/api/googleapi"
)

func TestDataprocExtractInitTimeout(t *testing.T) {
Expand Down

0 comments on commit 1176430

Please sign in to comment.