// Code generated by generators/resource/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.AddResourceTypeFactory("awscc_cloudfront_key_group", keyGroupResourceType) } // keyGroupResourceType returns the Terraform awscc_cloudfront_key_group resource type. // This Terraform resource type corresponds to the CloudFormation AWS::CloudFront::KeyGroup resource type. func keyGroupResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "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, Optional: true, }, "items": { // Property: Items Type: types.ListType{ElemType: types.StringType}, Required: true, }, "name": { // Property: Name Type: types.StringType, Required: true, }, }, ), Required: true, }, "last_modified_time": { // Property: LastModifiedTime // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::CloudFront::KeyGroup", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyGroup").WithTerraformTypeName("awscc_cloudfront_key_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "comment": "Comment", "id": "Id", "items": "Items", "key_group_config": "KeyGroupConfig", "last_modified_time": "LastModifiedTime", "name": "Name", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }