Skip to content

Commit

Permalink
Fix failing compute tests which use AccessConfigs (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-henderson authored Apr 25, 2018
1 parent 7e5ce3f commit 0a02d8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/compute_instance_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func expandAccessConfigs(configs []interface{}) []*computeBeta.AccessConfig {
Type: "ONE_TO_ONE_NAT",
NatIP: data["nat_ip"].(string),
}
if ptr, ok := data["public_ptr_domain_name"]; ok {
if ptr, ok := data["public_ptr_domain_name"]; ok && ptr != "" {
acs[i].SetPublicPtr = true
acs[i].PublicPtrDomainName = ptr.(string)
}
Expand Down
2 changes: 1 addition & 1 deletion google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err
Type: "ONE_TO_ONE_NAT",
NatIP: d.Get(acPrefix + ".nat_ip").(string),
}
if ptr, ok := d.GetOk(acPrefix + ".public_ptr_domain_name"); ok {
if ptr, ok := d.GetOk(acPrefix + ".public_ptr_domain_name"); ok && ptr != "" {
ac.SetPublicPtr = true
ac.PublicPtrDomainName = ptr.(string)
}
Expand Down

0 comments on commit 0a02d8e

Please sign in to comment.