// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package cloudfront import ( "context" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" ) func init() { registry.AddDataSourceTypeFactory("awscc_cloudfront_key_group", keyGroupDataSourceType) } // keyGroupDataSourceType returns the Terraform awscc_cloudfront_key_group data source type. // This Terraform data source type corresponds to the CloudFormation AWS::CloudFront::KeyGroup resource type. func keyGroupDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "key_group_config": { // Property: KeyGroupConfig // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Comment": { // "type": "string" // }, // "Items": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "Name": { // "type": "string" // } // }, // "required": [ // "Name", // "Items" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "comment": { // Property: Comment Type: types.StringType, Computed: true, }, "items": { // Property: Items Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "name": { // Property: Name Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "last_modified_time": { // Property: LastModifiedTime // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::CloudFront::KeyGroup", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyGroup").WithTerraformTypeName("awscc_cloudfront_key_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "comment": "Comment", "id": "Id", "items": "Items", "key_group_config": "KeyGroupConfig", "last_modified_time": "LastModifiedTime", "name": "Name", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }