CiscoDevNet / terraform-provider-mso

Terraform Cisco MSO provider
https://registry.terraform.io/providers/CiscoDevNet/mso/latest/docs
Mozilla Public License 2.0
7 stars 28 forks source link

'mso_schema_site_contract_service_graph' resource fails validation by NDO #273

Open andbyrne opened 4 weeks ago

andbyrne commented 4 weeks ago

Community Note

Terraform Version

Terraform v1.5.7

MSO version

APIC version and APIC Platform for Site Level Resources

Affected Resource(s)

Debug Output

2024-06-04T13:24:32.565+1000 [DEBUG] provider.terraform-provider-mso_v1.0.0: 2024/06/04 13:24:32 [DEBUG] HTTP Request: PATCH https://xxxxx/mso/api/v1/schemas/665918ffc87a72e13cd7c5ce?validate=false
2024-06-04T13:24:32.565+1000 [DEBUG] provider.terraform-provider-mso_v1.0.0: 2024/06/04 13:24:32 [DEBUG] HTTP Response: 400 400 Bad Request &{400 Bad Request 400 HTTP/1.1 1 1 map[Content-Language:[en] Content-Length:[240] Content-Type:[application/json] Date:[Tue, 04 Jun 2024 03:24:32 GMT] Server:[nginx] Strict-Transport-Security:[max-age=31536000; includeSubDomains] X-Ratelimit-Limit:[-1] X-Ratelimit-Remaining:[-1] X-Ratelimit-Reset:[1559582945]] 0x14000822340 240 [] false false map[] 0x1400009c500 0x140005816b0}
2024-06-04T13:24:32.565+1000 [DEBUG] provider.terraform-provider-mso_v1.0.0: 2024/06/04 13:24:32 [DEBUG] HTTP response unique string PATCH https://xxxxx/mso/api/v1/schemas/665918ffc87a72e13cd7c5ce?validate=false {"code":400,"message":"site-local Contract Internal1-PBR in site SITE1 in template SHARED: Provider connector in SHARED must have uniform redirect policy configured on all sites for node1 and contract Internal1-PBR","info":null}
2024-06-04T13:24:32.566+1000 [DEBUG] provider.terraform-provider-mso_v1.0.0: 2024/06/04 13:24:32 [DEBUG] Exit from do method
2024-06-04T13:24:32.567+1000 [DEBUG] State storage *cloud.State declined to persist a state snapshot
2024-06-04T13:24:32.567+1000 [ERROR] vertex "module.ndo.mso_schema_site_contract_service_graph.schema_site_contract_service_graph[\"Internal1/SHARED/Internal1-PBR/Internal1-PBR/SITE1\"]" error: "site-local Contract Internal1-PBR in site SITE1 in template SHARED: Provider connector in SHARED must have uniform redirect policy configured on all sites for node1 and contract Internal1-PBR"{}

Expected Behavior

A separate PATCH operation for each site should be accepted by NDO

Actual Behavior

NDO appears to have introduced a validation rule that won't permit sites in this resource to be configured in separate PATCH requests.

It looks like it will be necessary to update this resource to allow the configuration for all sites to be specified under one instance of the resource.

andbyrne commented 4 weeks ago

Also tested NDO v4.2(3e) which suffers from the same issue.