// Code generated by generators/resource/main.go; DO NOT EDIT. package wisdom 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" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_wisdom_assistant", assistantResourceType) } // assistantResourceType returns the Terraform awscc_wisdom_assistant resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Wisdom::Assistant resource type. func assistantResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "assistant_arn": { // Property: AssistantArn // CloudFormation resource type schema: // { // "pattern": "^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$", // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "assistant_id": { // Property: AssistantId // CloudFormation resource type schema: // { // "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "server_side_encryption_configuration": { // Property: ServerSideEncryptionConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "KmsKeyId": { // "maxLength": 4096, // "minLength": 1, // "type": "string" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "kms_key_id": { // Property: KmsKeyId Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 4096), }, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "pattern": "", // "type": "string" // }, // "Value": { // "maxLength": 256, // "minLength": 1, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, }, "value": { // Property: Value Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "enum": [ // "AGENT" // ], // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "AGENT", }), }, 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: "Definition of AWS::Wisdom::Assistant Resource Type", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Wisdom::Assistant").WithTerraformTypeName("awscc_wisdom_assistant") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "assistant_arn": "AssistantArn", "assistant_id": "AssistantId", "description": "Description", "key": "Key", "kms_key_id": "KmsKeyId", "name": "Name", "server_side_encryption_configuration": "ServerSideEncryptionConfiguration", "tags": "Tags", "type": "Type", "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }