diff --git a/pkg/properties/normalized.go b/pkg/properties/normalized.go index 8e53636..c490857 100644 --- a/pkg/properties/normalized.go +++ b/pkg/properties/normalized.go @@ -75,6 +75,7 @@ type TerraformProviderConfig struct { Suffix string `json:"suffix" yaml:"suffix"` PluralSuffix string `json:"plural_suffix" yaml:"plural_suffix"` PluralName string `json:"plural_name" yaml:"plural_name"` + PluralDescription string `json:"plural_description" yaml:"plural_description"` } type NameVariant struct { @@ -555,6 +556,7 @@ func schemaToSpec(object object.Object) (*Normalization, error) { Suffix: object.TerraformConfig.Suffix, PluralSuffix: object.TerraformConfig.PluralSuffix, PluralName: object.TerraformConfig.PluralName, + PluralDescription: object.TerraformConfig.PluralDescription, }, Locations: make(map[string]*Location), GoSdkSkip: object.GoSdkConfig.Skip, diff --git a/pkg/schema/object/object.go b/pkg/schema/object/object.go index 398934a..f7f3a6a 100644 --- a/pkg/schema/object/object.go +++ b/pkg/schema/object/object.go @@ -36,6 +36,7 @@ type TerraformConfig struct { Suffix string `yaml:"suffix"` PluralSuffix string `yaml:"plural_suffix"` PluralName string `yaml:"plural_name"` + PluralDescription string `yaml:"plural_description"` } type GoSdkConfig struct { diff --git a/pkg/translate/terraform_provider/funcs.go b/pkg/translate/terraform_provider/funcs.go index 1bd43ae..822423f 100644 --- a/pkg/translate/terraform_provider/funcs.go +++ b/pkg/translate/terraform_provider/funcs.go @@ -1181,10 +1181,11 @@ func createSchemaSpecForUuidModel(resourceTyp properties.ResourceType, schemaTyp } attributes = append(attributes, attributeCtx{ - Package: packageName, - Name: listName, - Required: true, - SchemaType: "ListNestedAttribute", + Package: packageName, + Name: listName, + Required: true, + Description: spec.TerraformProviderConfig.PluralDescription, + SchemaType: "ListNestedAttribute", }) var isResource bool @@ -1302,10 +1303,11 @@ func createSchemaSpecForEntryListModel(resourceTyp properties.ResourceType, sche } attributes = append(attributes, attributeCtx{ - Package: packageName, - Name: listName, - Required: true, - SchemaType: "MapNestedAttribute", + Package: packageName, + Name: listName, + Description: spec.TerraformProviderConfig.PluralDescription, + Required: true, + SchemaType: "MapNestedAttribute", }) var isResource bool diff --git a/specs/schema/object.schema.json b/specs/schema/object.schema.json index 0666612..2ec6e66 100644 --- a/specs/schema/object.schema.json +++ b/specs/schema/object.schema.json @@ -47,7 +47,8 @@ "type": "string" }, "plural_suffix": { "type": "string" }, - "plural_name": { "type": "string" } + "plural_name": { "type": "string" }, + "plural_description": { "type": "string" } } }, "go_sdk_config": {