The docs state that both the username and custom_id properties are "semi-optional" - at least one of them must be set. However, if you try to set only one of these options an error is returned, complaining that the property length must be at least 1.
A consumer can be created with either the username or custom_id set, they don't both need to be, as per the docs.
Actual Behavior
Attempting to create a consumer with no custom_id set causes an error to be returned, complaining that the custom_id property must be at least 1 character long:
Error: failed to create kong consumer: &{<nil> 0xc00033d6f0 0xc00033d5f0 <nil> []} error: HTTP status 400 (message: "schema violation (custom_id: length must be at least 1)")
Steps to Reproduce
Create kong_consumer resource with username defined and custom_id omitted
terraform apply
References
The following issue needs resolving to support update properly in the provider:
The docs state that both the
username
andcustom_id
properties are "semi-optional" - at least one of them must be set. However, if you try to set only one of these options an error is returned, complaining that the property length must be at least 1.I have a fix for this locally but it's dependent on a a local fix to https://github.com/Kong/go-kong/issues/94.
Terraform Version
v0.13.7
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
A consumer can be created with either the
username
orcustom_id
set, they don't both need to be, as per the docs.Actual Behavior
Attempting to create a consumer with no
custom_id
set causes an error to be returned, complaining that thecustom_id
property must be at least 1 character long:Steps to Reproduce
kong_consumer
resource withusername
defined andcustom_id
omittedterraform apply
References
The following issue needs resolving to support update properly in the provider: