Skip to content

Commit 139d1cf

Browse files
Resolving GitHub issues: #359, #370 (PR #434)
1 parent 8d372fe commit 139d1cf

File tree

9 files changed

+32
-11
lines changed

9 files changed

+32
-11
lines changed

aci/resource_aci_bgppeerp.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ func resourceAciBgpPeerConnectivityProfileCreate(d *schema.ResourceData, m inter
306306
if err != nil {
307307
return err
308308
}
309-
310309
PeerConnectivityProfileDn := bgpPeerP.DistinguishedName
311310
bgpLocalAsnPAttr := models.LocalAutonomousSystemProfileAttributes{}
312311

aci/resource_aci_infranodep.go

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package aci
33
import (
44
"fmt"
55
"log"
6+
"reflect"
7+
"sort"
68
"strings"
79

810
"github.com/ciscoecosystem/aci-go-client/client"
@@ -628,7 +630,15 @@ func resourceAciLeafProfileRead(d *schema.ResourceData, m interface{}) error {
628630
d.Set("relation_infra_rs_acc_card_p", make([]string, 0, 1))
629631

630632
} else {
631-
d.Set("relation_infra_rs_acc_card_p", infraRsAccCardPData)
633+
if _, ok := d.GetOk("relation_infra_rs_acc_card_p"); ok {
634+
relationParamList := toStringList(d.Get("relation_infra_rs_acc_card_p").(*schema.Set).List())
635+
infraRsAccCardPDataList := toStringList(infraRsAccCardPData.(*schema.Set).List())
636+
sort.Strings(relationParamList)
637+
sort.Strings(infraRsAccCardPDataList)
638+
if !reflect.DeepEqual(relationParamList, infraRsAccCardPDataList) {
639+
d.Set("relation_infra_rs_acc_card_p", make([]string, 0, 1))
640+
}
641+
}
632642
}
633643

634644
infraRsAccPortPData, err := aciClient.ReadRelationinfraRsAccPortPFromLeafProfile(dn)
@@ -637,7 +647,15 @@ func resourceAciLeafProfileRead(d *schema.ResourceData, m interface{}) error {
637647
d.Set("relation_infra_rs_acc_port_p", make([]string, 0, 1))
638648

639649
} else {
640-
d.Set("relation_infra_rs_acc_port_p", infraRsAccPortPData)
650+
if _, ok := d.GetOk("relation_infra_rs_acc_port_p"); ok {
651+
relationParamList := toStringList(d.Get("relation_infra_rs_acc_port_p").(*schema.Set).List())
652+
infraRsAccPortPDataList := toStringList(infraRsAccPortPData.(*schema.Set).List())
653+
sort.Strings(relationParamList)
654+
sort.Strings(infraRsAccPortPDataList)
655+
if !reflect.DeepEqual(relationParamList, infraRsAccPortPDataList) {
656+
d.Set("relation_infra_rs_acc_port_p", make([]string, 0, 1))
657+
}
658+
}
641659
}
642660

643661
log.Printf("[DEBUG] %s: Read finished successfully", d.Id())

aci/resource_aci_infraspines.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@ func resourceAciSwitchSpineAssociationRead(d *schema.ResourceData, m interface{}
282282
d.Set("relation_infra_rs_spine_acc_node_p_grp", "")
283283

284284
} else {
285-
d.Set("relation_infra_rs_spine_acc_node_p_grp", infraRsSpineAccNodePGrpData)
285+
if _, ok := d.GetOk("relation_infra_rs_spine_acc_node_p_grp"); ok {
286+
tfName := d.Get("relation_infra_rs_spine_acc_node_p_grp").(string)
287+
if tfName != infraRsSpineAccNodePGrpData {
288+
d.Set("relation_infra_rs_spine_acc_node_p_grp", "")
289+
}
290+
}
286291
}
287292

288293
log.Printf("[DEBUG] %s: Read finished successfully", d.Id())

aci/resource_aci_l3extrspathl3outatt.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ func resourceAciL3outPathAttachment() *schema.Resource {
117117
Type: schema.TypeString,
118118
Optional: true,
119119
Computed: true,
120-
ValidateFunc: validation.StringInSlice([]string{
121-
"inherit",
122-
}, false),
123120
},
124121

125122
"target_dscp": &schema.Schema{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-aci
33
go 1.12
44

55
require (
6-
github.com/ciscoecosystem/aci-go-client v1.11.0
6+
github.com/ciscoecosystem/aci-go-client v1.11.2
77
github.com/ghodss/yaml v1.0.0
88
github.com/hashicorp/terraform v0.12.5
99
github.com/hashicorp/terraform-plugin-sdk v1.14.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d/go.mod h1:nSuG5e5P
7272
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
7373
github.com/ciscoecosystem/aci-go-client v1.11.0 h1:q3Uif50ZVLPLg2c9i0DV7b4xc3+9npenlzMKCm5es0g=
7474
github.com/ciscoecosystem/aci-go-client v1.11.0/go.mod h1:fhY7vWysK655g3Yp5Fz4Zje/JN4+moRe8RjwiRy0amQ=
75+
github.com/ciscoecosystem/aci-go-client v1.11.2 h1:niqmOIinZ70vxU4jFgURkk12afNot7sOq0Vn3FnWVCM=
76+
github.com/ciscoecosystem/aci-go-client v1.11.2/go.mod h1:fhY7vWysK655g3Yp5Fz4Zje/JN4+moRe8RjwiRy0amQ=
7577
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
7678
github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
7779
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=

vendor/github.com/ciscoecosystem/aci-go-client/client/infraSpineS_service.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ github.com/bgentry/go-netrc/netrc
5858
github.com/bgentry/speakeasy
5959
# github.com/blang/semver v3.5.1+incompatible
6060
github.com/blang/semver
61-
# github.com/ciscoecosystem/aci-go-client v1.11.0
61+
# github.com/ciscoecosystem/aci-go-client v1.11.2
6262
github.com/ciscoecosystem/aci-go-client/client
6363
github.com/ciscoecosystem/aci-go-client/container
6464
github.com/ciscoecosystem/aci-go-client/models

website/docs/r/l3out_path_attachment.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ resource "aci_l3out_path_attachment" "example" {
5959
- `mode` - (Optional) BGP Domain mode.
6060
Allowed values: "native", "regular", "untagged". Default value: "regular".
6161
- `mtu` - (Optional) The maximum transmit unit of the external network.
62-
Allowed value: "inherit".
62+
Default value: "inherit".
6363

6464
- `target_dscp` - (Optional) The target differentiated service code point (DSCP) of the path attached to the layer 3 outside profile. Default value: "unspecified".
6565
Allowed values: "AF11", "AF12", "AF13", "AF21", "AF22", "AF23", "AF31", "AF32", "AF33", "AF41", "AF42", "AF43", "CS0", "CS1", "CS2", "CS3", "CS4", "CS5", "CS6", "CS7", "EF", "VA", "unspecified". Default value: "unspecified".

0 commit comments

Comments
 (0)