You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure the following data model (note that in this data model, we on purpose didn't include some required variables):
resource "sdwan_system_feature_profile" "system1" {
name = "system1"
description = ""
}
resource "sdwan_system_feature_profile" "transport1" {
name = "transport1"
description = ""
}
resource "sdwan_configuration_group" "cg1" {
description = "configuration group 1"
devices = [
{
deploy = true
id = "C8K-172343D2-7380-8B1B-5509-6FCB24AFA689"
variables = [
{
name = "host_name"
value = "Edge2"
}
]
}
]
feature_profiles = [{
id = sdwan_system_feature_profile.system1.id
}]
name = "cg1"
solution = "sdwan"
}
This will fail with the below error. This error is expected as we didn't fill some of the required variables:
│ Error: Client Error
│
│ with sdwan_configuration_group.cg1,
│ on main.tf line 26, in resource "sdwan_configuration_group" "cg1":
│ 26: resource "sdwan_configuration_group" "cg1" {
│
│ Failed to configure configuration group device variables (PUT), got error: HTTP Request failed:
│ StatusCode 400, {"error":{"message":"Invalid Json Payload
│ Input","code":"SCHVALID0001","details":"{\"Validation Errors\":{\"Required But Missing
│ Attributes\":[\"pseudo_commit_timer\",\"site_id\",\"system_ip\"]}}","type":"error"}}
╵
Now if you try to trigger the apply again, TF will again try to create this resource and will fail as it already created it in the previous apply:
╷
│ Error: Client Error
│
│ with sdwan_configuration_group.cg1,
│ on main.tf line 26, in resource "sdwan_configuration_group" "cg1":
│ 26: resource "sdwan_configuration_group" "cg1" {
│
│ Failed to configure configuration group (POST), got error: HTTP Request failed: StatusCode 400,
│ {"error":{"message":"Failed to create config group.","code":"CFGRP0001","details":"config group with
│ name 'cg1' already exists","type":"error"}}
This is not expected and should be fixed. If first apply created a config group correctly and attachment failed, then on next TF apply we should just add devices block to existing config group resource and not try to recreate config group again.
The text was updated successfully, but these errors were encountered:
Configure the following data model (note that in this data model, we on purpose didn't include some required variables):
This will fail with the below error. This error is expected as we didn't fill some of the required variables:
Now if you try to trigger the apply again, TF will again try to create this resource and will fail as it already created it in the previous apply:
This is not expected and should be fixed. If first apply created a config group correctly and attachment failed, then on next TF apply we should just add devices block to existing config group resource and not try to recreate config group again.
The text was updated successfully, but these errors were encountered: