Skip to content

Commit

Permalink
Merge pull request #152 from instaclustr/INS-1745-fix-firewall-rule-o…
Browse files Browse the repository at this point in the history
…rdering

Make firewall rules sets instead
  • Loading branch information
admintfprovider authored Feb 7, 2022
2 parents 54ac4aa + af4cf52 commit 65c7d70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BIN_NAME=terraform-provider-instaclustr
# for VERSION, don't add prefix "v", e.g., use "1.9.8" instead of "v1.9.8" as it could break circleCI stuff


VERSION=1.15.1
VERSION=1.15.2

INSTALL_FOLDER=$(HOME)/.terraform.d/plugins/terraform.instaclustr.com/instaclustr/instaclustr/$(VERSION)/darwin_amd64

Expand Down Expand Up @@ -72,7 +72,7 @@ ifndef IC_AZURE_STORAGE_CONTAINER_NAME
@echo "IC_AZURE_STORAGE_CONTAINER_NAME must be set for acceptance test (Kafka Connect custom connector bucket)"
@exit 1
endif
cd acc_test && TF_ACC=1 go test -v -timeout 200m -count=1 -parallel=4
cd acc_test && TF_ACC=1 go test -v -timeout 200m -count=1 -parallel=6



Expand Down
7 changes: 4 additions & 3 deletions instaclustr/resource_firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func resourceFirewallRule() *schema.Resource {
},

"rules": {
Type: schema.TypeList,
Type: schema.TypeSet,
Required: true,
ForceNew: true,
Elem: &schema.Schema{
Expand All @@ -62,7 +62,7 @@ func resourceFirewallRuleCreate(d *schema.ResourceData, meta interface{}) error

rules := make([]RuleType, 0)

for _, rule := range d.Get("rules").([]interface{}) {
for _, rule := range d.Get("rules").(*schema.Set).List() {
aRule := ""

for _, value := range rule.(map[string]interface{}) {
Expand Down Expand Up @@ -129,6 +129,7 @@ func resourceFirewallRuleRead(d *schema.ResourceData, meta interface{}) error {
}
}
}
log.Printf("[INFO] Finished Reading the status of cluster %s.", id)
return nil
}

Expand All @@ -149,7 +150,7 @@ func resourceFirewallRuleDelete(d *schema.ResourceData, meta interface{}) error

rules := make([]RuleType, 0)

for _, rule := range d.Get("rules").([]interface{}) {
for _, rule := range d.Get("rules").(*schema.Set).List() {
aRule := ""

for _, value := range rule.(map[string]interface{}) {
Expand Down

0 comments on commit 65c7d70

Please sign in to comment.