Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Fix fex and micro_seg_vlan attributes in resource_mso_schema_site_anp_epg_bulk_staticport to be correctly set when index shift occur in the static_ports list (DCNE-223) #312

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions mso/resource_mso_schema_site_anp_epg_bulk_staticport.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ func resourceMSOSchemaSiteAnpEpgBulkStaticPort() *schema.Resource {
ValidateFunc: validation.StringLenBetween(1, 1000),
},
"leaf": {
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 leaf state value will be used at the location of the list index when not provided in config.
// Computed: true,
ValidateFunc: validation.StringLenBetween(1, 1000),
},
"path": {
Expand All @@ -94,27 +96,35 @@ func resourceMSOSchemaSiteAnpEpgBulkStaticPort() *schema.Resource {
"deployment_immediacy": {
Type: schema.TypeString,
Optional: true,
Computed: 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,
// 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
Loading