Open bardahlm opened 10 months ago
Hi @bardahlm, I've managed to reproduce the issue and I'm looking for a fix.
The bug affecting A records is located in A.go#L293, although all the dynamic records are also affected.
Long story short, when the for_each
meta-argument is set, the ValidateConfig
function receives an incomplete record, and fails as if the user hadn't filled the minimum required fields.
On that side there's nothing I can do as it's how the Terraform provider framework currently works.
I'm in the process of migrating the code from resource.ConfigValidator
to resource.ResourceWithConfigValidators
, but it's going to take some time and it may not fix the issue. More info is about resources validation is available here.
I'm trying to create multiple a-records. I populate an array with values:
I then apply those values to a resource:
But this fails with:
This passes plan, though:
(but will configure the wrong IP address)