Open Matt2298 opened 1 year ago
Some I've stumbled upon myself (exact same situation as described: CI the pre-merge checks which run terraform plan
all OK, then the subsequent merged pipeline that applies the changes would fail)
confluent_identity_pool
:
display_name
: limited to 64description
: limited to 128filter
: limited to 300Just to add to this. Recently we were adding topic ACL and one of them was:
"'internal.system"
.
Which is clearly wrong. But our PR pipeline actually does plan the changes:
resource_name = "'internal.system"
And then of course apply falied:
Error: error creating Kafka ACLs: 400 Bad Request: Internal error: Could not create ACLs because following resource names are invalid : ['internal.system]
I think basic validation like topics/ACL length and shape validation should be part of this provider because right now it feels more like weaving jsons not code.
Problem
When creating terraform resources for kafka, some of the resources (the only ones I've stumbled across so far) have hard limits on the length of the field. This hard limit is only found when running
terraform apply
, and does not appear when runningterraform plan
.This means that when running terraform in a generic CI pipeline, the pre-merge checks which run
terraform plan
and succeed, however the subsequent merged pipeline that applies the changes would fail.Expected
When running terraform plan, resource validation should raise errors as it does in terraform plan, so that they can be caught and rectified before merging.
Steps to reproduce:
terraform plan
Output:terraform apply
Output:Notes
This affects both the description of the resources at 128 chars, as well as the names for connectors at 64 chars: