Skip to content

Add legacy long form project to compute firewall policy rule #8940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/12563.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func resourceComputeFirewallPolicyRuleCreate(d *schema.ResourceData, meta interf
obj["firewallPolicy"] = firewallPolicyProp
}

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

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

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

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

billingProject := ""

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

// Replace import id for the resource id
id, err := tpgresource.ReplaceVars(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
id, err := tpgresource.ReplaceVarsForId(d, config, "locations/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}")
if err != nil {
return nil, fmt.Errorf("Error constructing id: %s", err)
}
Expand Down
Loading