`diff.GetOk` return `nil` for the value of `TypeList` defined in `TypeSet`
ms-zhenhua opened this issue · comments
SDK version
v2.26.1
Relevant provider source code
{
Schema: map[string]*pluginsdk.Schema{
...
"prop_set": {
Type: pluginsdk.TypeSet,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
...
"prop_list": {
Type: pluginsdk.TypeList,
Elem: &pluginsdk.Schema{
Type: pluginsdk.TypeString,
},
},
},
},
},
...
},
...
CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, diff *pluginsdk.ResourceDiff, v interface{}) error {
...
value, _ := diff.GetOk("prop_set")
...
}
...
}
Terraform Configuration Files
prop_set {
...
prop_list = ["element-1"]
...
}
Debug Output
Expected Behavior
diff.GetOk
should return a prop_list
with length=1
and the value
is element-1
Actual Behavior
diff.GetOk
should return a prop_list
with length=1
and the value
is nil
Steps to Reproduce
1. `terraform init`
2. `terraform apply`