// Code generated by generators/resource/main.go; DO NOT EDIT. package events 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_events_archive", archiveResourceType) } // archiveResourceType returns the Terraform awscc_events_archive resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Events::Archive resource type. func archiveResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "archive_name": { // Property: ArchiveName // CloudFormation resource type schema: // { // "maxLength": 48, // "minLength": 1, // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "arn": { // Property: Arn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, "event_pattern": { // Property: EventPattern // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Optional: true, }, "retention_days": { // Property: RetentionDays // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Optional: true, }, "source_arn": { // Property: SourceArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::Events::Archive", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Events::Archive").WithTerraformTypeName("awscc_events_archive") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "archive_name": "ArchiveName", "arn": "Arn", "description": "Description", "event_pattern": "EventPattern", "retention_days": "RetentionDays", "source_arn": "SourceArn", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }