Skip to content

Commit

Permalink
Merge pull request #24 from ukfast/rule-creation-force-new
Browse files Browse the repository at this point in the history
Force new for rules on policy change
  • Loading branch information
0x4c6565 authored Feb 2, 2022
2 parents bc89387 + cd9dcf1 commit 19db5e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ecloud/resource_firewallrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func resourceFirewallRule() *schema.Resource {
"firewall_policy_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"name": {
Type: schema.TypeString,
Expand Down
7 changes: 4 additions & 3 deletions ecloud/resource_networkrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func resourceNetworkRule() *schema.Resource {
"network_policy_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"name": {
Type: schema.TypeString,
Expand Down Expand Up @@ -165,12 +166,12 @@ func resourceNetworkRuleRead(d *schema.ResourceData, meta interface{}) error {

log.Printf("[INFO] Retrieving network rule ports for network rule with ID [%s]", d.Id())
// ports, err := service.GetNetworkRuleNetworkRulePorts(d.Id(), connection.APIRequestParameters{})
//using filter parameter in request until dedicated API endpoint is

//using filter parameter in request until dedicated API endpoint is
//added for service.GetNetworkRuleNetworkRulePorts().
params := connection.APIRequestParameters{}
params.WithFilter(*connection.NewAPIRequestFiltering("network_rule_id", connection.EQOperator, []string{d.Id()}))

ports, err := service.GetNetworkRulePorts(params)
if err != nil {
return err
Expand Down

0 comments on commit 19db5e2

Please sign in to comment.