Skip to content

Commit

Permalink
Merge pull request #132 from arjunrajinstaclustr/recreate-fw-on-clust…
Browse files Browse the repository at this point in the history
…er-recreate

Fix for cluster dependent resources not forcing new resource on cluster ID change
  • Loading branch information
admintfprovider authored Nov 7, 2021
2 parents 5fe5b4a + 8d4dbcb commit 6ad8da8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions instaclustr/resource_firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ func resourceFirewallRule() *schema.Resource {
return &schema.Resource{
Create: resourceFirewallRuleCreate,
Read: resourceFirewallRuleRead,
Update: resourceFirewallRuleUpdate,
Delete: resourceFirewallRuleDelete,

Importer: &schema.ResourceImporter{
Expand All @@ -24,20 +23,24 @@ func resourceFirewallRule() *schema.Resource {
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"rule_cidr": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"rule_security_group_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},

"rules": {
Type: schema.TypeList,
Required: true,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeMap,
Elem: schema.TypeString,
Expand Down Expand Up @@ -139,10 +142,6 @@ func resourceFirewallRuleStateImport(d *schema.ResourceData, meta interface{}) (
return []*schema.ResourceData{d}, nil
}

func resourceFirewallRuleUpdate(d *schema.ResourceData, meta interface{}) error {
return nil
}

func resourceFirewallRuleDelete(d *schema.ResourceData, meta interface{}) error {
client := meta.(*Config).Client
id := d.Get("cluster_id").(string)
Expand Down
1 change: 1 addition & 0 deletions instaclustr/resource_kafka_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func resourceKafkaUser() *schema.Resource {
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"username": {
Expand Down
1 change: 1 addition & 0 deletions instaclustr/resource_vpc_peering.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func resourceVpcPeering() *schema.Resource {
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"cdc_id": {
Expand Down

0 comments on commit 6ad8da8

Please sign in to comment.