Skip to content

Commit

Permalink
[bugfix] Prevent error by setting flood_on_encap and prio for aci_end…
Browse files Browse the repository at this point in the history
…point_security_group
  • Loading branch information
akinross committed May 2, 2024
1 parent 6344747 commit 5927ea4
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions aci/resource_aci_fvesg.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,11 @@ func setEndpointSecurityGroupAttributes(fvESg *models.EndpointSecurityGroup, d *
return d, err
}
d.Set("annotation", fvESgMap["annotation"])
d.Set("flood_on_encap", fvESgMap["floodOnEncap"])
d.Set("match_t", fvESgMap["matchT"])
d.Set("name", fvESgMap["name"])
d.Set("application_profile_dn", GetParentDn(fvESg.DistinguishedName, fmt.Sprintf("/esg-%s", fvESgMap["name"])))
d.Set("pc_enf_pref", fvESgMap["pcEnfPref"])
d.Set("pref_gr_memb", fvESgMap["prefGrMemb"])
d.Set("prio", fvESgMap["prio"])
d.Set("name_alias", fvESgMap["nameAlias"])
return d, nil
}
Expand Down Expand Up @@ -251,10 +249,6 @@ func resourceAciEndpointSecurityGroupCreate(ctx context.Context, d *schema.Resou
fvESgAttr.Annotation = "{}"
}

if FloodOnEncap, ok := d.GetOk("flood_on_encap"); ok {
fvESgAttr.FloodOnEncap = FloodOnEncap.(string)
}

if MatchT, ok := d.GetOk("match_t"); ok {
fvESgAttr.MatchT = MatchT.(string)
}
Expand All @@ -271,9 +265,6 @@ func resourceAciEndpointSecurityGroupCreate(ctx context.Context, d *schema.Resou
fvESgAttr.PrefGrMemb = PrefGrMemb.(string)
}

if Prio, ok := d.GetOk("prio"); ok {
fvESgAttr.Prio = Prio.(string)
}
fvESg := models.NewEndpointSecurityGroup(fmt.Sprintf("esg-%s", name), ApplicationProfileDn, desc, nameAlias, fvESgAttr)

err := aciClient.Save(fvESg)
Expand Down Expand Up @@ -450,10 +441,6 @@ func resourceAciEndpointSecurityGroupUpdate(ctx context.Context, d *schema.Resou
fvESgAttr.Annotation = "{}"
}

if FloodOnEncap, ok := d.GetOk("flood_on_encap"); ok {
fvESgAttr.FloodOnEncap = FloodOnEncap.(string)
}

if MatchT, ok := d.GetOk("match_t"); ok {
fvESgAttr.MatchT = MatchT.(string)
}
Expand All @@ -470,9 +457,6 @@ func resourceAciEndpointSecurityGroupUpdate(ctx context.Context, d *schema.Resou
fvESgAttr.PrefGrMemb = PrefGrMemb.(string)
}

if Prio, ok := d.GetOk("prio"); ok {
fvESgAttr.Prio = Prio.(string)
}
fvESg := models.NewEndpointSecurityGroup(fmt.Sprintf("esg-%s", name), ApplicationProfileDn, desc, nameAlias, fvESgAttr)

fvESg.Status = "modified"
Expand Down

0 comments on commit 5927ea4

Please sign in to comment.