From 7d4baafca72c4b50ac4ecf7cfd5bbb5308faa387 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 14 Feb 2025 13:40:06 +0100 Subject: [PATCH] require all identity attributes to be specified --- internal/configs/configschema/decoder_spec.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/configs/configschema/decoder_spec.go b/internal/configs/configschema/decoder_spec.go index 101e0ddbca6e..896cbc04b245 100644 --- a/internal/configs/configschema/decoder_spec.go +++ b/internal/configs/configschema/decoder_spec.go @@ -225,7 +225,12 @@ func (a *IdentityAttribute) decoderSpec(name string) hcldec.Spec { ret := &hcldec.AttrSpec{Name: name} ret.Type = a.Type - ret.Required = a.RequiredForImport // TODO? check + // When dealing with IdentityAttribute we expect every attribute to be required. + // This is generally true for all communication between providers and Terraform. + // For import, we allow the user to only specify a subset of the attributes, where + // RequiredForImport attributes are required and OptionalForImport attributes are optional. + // The validation for this will rely on a separate spec. + ret.Required = true return ret }