[2022-03-03T17:32:32.545] [ERROR] default - ╷
│ Error: expected length of record.0.value to be in the range (1 - 1024), got
│
│ with azurerm_dns_txt_record.verisdev-userms-fe-apex-domain-txt-record,
│ on cdk.tf.json line 2843, in resource.azurerm_dns_txt_record.verisdev-userms-fe-apex-domain-txt-record:
│ 2843: "record": [
│ 2844: {
│ 2845: "value": "${azurerm_static_site_custom_domain.verisdev-userms-fe-custom-domain.validation_token}"
│ 2846: }
│ 2847: ],
I execute the code once, it passed, it created the TXT record.
Now on each new yarn cdktf build when I try to deploy something else I get this error.
I can see the DNS record (TXT record) with its value. As I mentioned before this execution was successful for the first time.
Even when I do yarn cdktf diff stackname I get the same error.
[2022-03-07T10:28:04.850] [ERROR] default - ╷
│ Error: expected length of record.0.value to be in the range (1 - 1024), got
│
│ with azurerm_dns_txt_record.verisdev-userms-fe-apex-domain-txt-record,
│ on cdk.tf.json line 2843, in resource.azurerm_dns_txt_record.verisdev-userms-fe-apex-domain-txt-record:
│ 2843: “record”: [
│ 2844: {
│ 2845: “value”: “${azurerm_static_site_custom_domain.verisdev-userms-fe-custom-domain.validation_token}”
│ 2846: }
│ 2847: ],
So I commented the code and it deleted the record. Then I uncommented it and execute yarn cdktf deploy stanckname and the code was deployed without the issue I mentioned above, new DNS txt record was created. Then for a test I did another yarn cdktf deploy stackname and it failed with the same error. The same is with yarn cdktf diff stackname. Basically terraform it is giving this error if there is already existing DNS txt record, which blocks my work, cause simply I can’t continue to deploy stuff without this error resolved