Skip to content

Commit

Permalink
[bugfix] Fix fex and micro_seg_vlan attributes in resource_mso_schema…
Browse files Browse the repository at this point in the history
…_site_anp_epg_bulk_staticport to be correctly set when index shift occur in the static_ports list
  • Loading branch information
akinross committed Oct 31, 2024
1 parent acf471d commit 2fc4409
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions mso/resource_mso_schema_site_anp_epg_bulk_staticport.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ func resourceMSOSchemaSiteAnpEpgBulkStaticPort() *schema.Resource {
},
"leaf": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Required: true,
ValidateFunc: validation.StringLenBetween(1, 1000),
},
"path": {
Expand All @@ -93,28 +92,36 @@ func resourceMSOSchemaSiteAnpEpgBulkStaticPort() *schema.Resource {
},
"deployment_immediacy": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Required: true,
// Remove computed because when a user updates the list and causes index shifts
// the deployment_immediacy state value will be used at the location of the list index when not provided in config.
// Computed: true,
ValidateFunc: validation.StringInSlice([]string{
"immediate",
"lazy",
}, false),
},
"fex": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Type: schema.TypeString,
Optional: true,
// Remove computed because when a user updates the list and causes index shifts
// the fex state value will be used at the location of the list index when not provided in config.
// Computed: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"micro_seg_vlan": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
// Remove computed because when a user updates the list and causes index shifts
// the micro_seg_vlan state value will be used at the location of the list index when not provided in config.
// Computed: true,
},
"mode": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Required: true,
// Remove computed because when a user updates the list and causes index shifts
// the mode state value will be used at the location of the list index when not provided in config.
// Computed: true,
ValidateFunc: validation.StringInSlice([]string{
"native",
"regular",
Expand Down

0 comments on commit 2fc4409

Please sign in to comment.