Skip to content

Commit 8301fa0

Browse files
modular-magicianshuyama1
authored andcommitted
Add legacy long form project to compute firewall policy rule (#12563) (#8940)
[upstream:25ca219ce93747b189a4a6501348ff812a765052] Signed-off-by: Modular Magician <[email protected]>
1 parent 7d938e0 commit 8301fa0

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Diff for: .changelog/12563.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

Diff for: google-beta/services/compute/resource_compute_firewall_policy_rule.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func resourceComputeFirewallPolicyRuleCreate(d *schema.ResourceData, meta interf
347347
obj["firewallPolicy"] = firewallPolicyProp
348348
}
349349

350-
url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/addRule")
350+
url, err := tpgresource.ReplaceVarsForId(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/addRule")
351351
if err != nil {
352352
return err
353353
}
@@ -376,7 +376,7 @@ func resourceComputeFirewallPolicyRuleCreate(d *schema.ResourceData, meta interf
376376
}
377377

378378
// Store the ID now
379-
id, err := tpgresource.ReplaceVars(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
379+
id, err := tpgresource.ReplaceVarsForId(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
380380
if err != nil {
381381
return fmt.Errorf("Error constructing id: %s", err)
382382
}
@@ -406,7 +406,7 @@ func resourceComputeFirewallPolicyRuleRead(d *schema.ResourceData, meta interfac
406406
return err
407407
}
408408

409-
url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/getRule?priority={{priority}}")
409+
url, err := tpgresource.ReplaceVarsForId(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/getRule?priority={{priority}}")
410410
if err != nil {
411411
return err
412412
}
@@ -560,7 +560,7 @@ func resourceComputeFirewallPolicyRuleUpdate(d *schema.ResourceData, meta interf
560560
obj["firewallPolicy"] = firewallPolicyProp
561561
}
562562

563-
url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/patchRule?priority={{priority}}")
563+
url, err := tpgresource.ReplaceVarsForId(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/patchRule?priority={{priority}}")
564564
if err != nil {
565565
return err
566566
}
@@ -613,7 +613,7 @@ func resourceComputeFirewallPolicyRuleDelete(d *schema.ResourceData, meta interf
613613

614614
billingProject := ""
615615

616-
url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/removeRule?priority={{priority}}")
616+
url, err := tpgresource.ReplaceVarsForId(d, config, "{{ComputeBasePath}}locations/global/firewallPolicies/{{firewall_policy}}/removeRule?priority={{priority}}")
617617
if err != nil {
618618
return err
619619
}
@@ -668,7 +668,7 @@ func resourceComputeFirewallPolicyRuleImport(d *schema.ResourceData, meta interf
668668
}
669669

670670
// Replace import id for the resource id
671-
id, err := tpgresource.ReplaceVars(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
671+
id, err := tpgresource.ReplaceVarsForId(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
672672
if err != nil {
673673
return nil, fmt.Errorf("Error constructing id: %s", err)
674674
}

0 commit comments

Comments
 (0)