// Code generated by generators/resource/main.go; DO NOT EDIT. package stepfunctions 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_stepfunctions_state_machine", stateMachineResourceType) } // stateMachineResourceType returns the Terraform awscc_stepfunctions_state_machine resource type. // This Terraform resource type corresponds to the CloudFormation AWS::StepFunctions::StateMachine resource type. func stateMachineResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "maxLength": 2048, // "minLength": 1, // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "definition": { // Property: Definition // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Optional: true, // Definition is a write-only property. }, "definition_s3_location": { // Property: DefinitionS3Location // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Bucket": { // "type": "string" // }, // "Key": { // "type": "string" // }, // "Version": { // "type": "string" // } // }, // "required": [ // "Bucket", // "Key" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "bucket": { // Property: Bucket Type: types.StringType, Required: true, }, "key": { // Property: Key Type: types.StringType, Required: true, }, "version": { // Property: Version Type: types.StringType, Optional: true, }, }, ), Optional: true, // DefinitionS3Location is a write-only property. }, "definition_string": { // Property: DefinitionString // CloudFormation resource type schema: // { // "maxLength": 1048576, // "minLength": 1, // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1048576), }, }, "definition_substitutions": { // Property: DefinitionSubstitutions // CloudFormation resource type schema: // { // "additionalProperties": false, // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // } // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Optional: true, // DefinitionSubstitutions is a write-only property. }, "logging_configuration": { // Property: LoggingConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Destinations": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "CloudWatchLogsLogGroup": { // "additionalProperties": false, // "properties": { // "LogGroupArn": { // "maxLength": 256, // "minLength": 1, // "type": "string" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "minItems": 1, // "type": "array" // }, // "IncludeExecutionData": { // "type": "boolean" // }, // "Level": { // "enum": [ // "ALL", // "ERROR", // "FATAL", // "OFF" // ], // "type": "string" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "destinations": { // Property: Destinations Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "cloudwatch_logs_log_group": { // Property: CloudWatchLogsLogGroup Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "log_group_arn": { // Property: LogGroupArn Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), }, }, }, ), Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtLeast(1), }, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "include_execution_data": { // Property: IncludeExecutionData Type: types.BoolType, Optional: true, }, "level": { // Property: Level Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "ALL", "ERROR", "FATAL", "OFF", }), }, }, }, ), Optional: true, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "maxLength": 80, // "minLength": 1, // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "role_arn": { // Property: RoleArn // CloudFormation resource type schema: // { // "maxLength": 256, // "minLength": 1, // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), }, }, "state_machine_name": { // Property: StateMachineName // CloudFormation resource type schema: // { // "maxLength": 80, // "minLength": 1, // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 80), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "state_machine_type": { // Property: StateMachineType // CloudFormation resource type schema: // { // "enum": [ // "STANDARD", // "EXPRESS" // ], // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "STANDARD", "EXPRESS", }), }, 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, // "type": "string" // }, // "Value": { // "maxLength": 256, // "minLength": 1, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( 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.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "tracing_configuration": { // Property: TracingConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Enabled": { // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "enabled": { // Property: Enabled Type: types.BoolType, Optional: true, }, }, ), Optional: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource schema for StateMachine", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::StepFunctions::StateMachine").WithTerraformTypeName("awscc_stepfunctions_state_machine") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", "cloudwatch_logs_log_group": "CloudWatchLogsLogGroup", "definition": "Definition", "definition_s3_location": "DefinitionS3Location", "definition_string": "DefinitionString", "definition_substitutions": "DefinitionSubstitutions", "destinations": "Destinations", "enabled": "Enabled", "include_execution_data": "IncludeExecutionData", "key": "Key", "level": "Level", "log_group_arn": "LogGroupArn", "logging_configuration": "LoggingConfiguration", "name": "Name", "role_arn": "RoleArn", "state_machine_name": "StateMachineName", "state_machine_type": "StateMachineType", "tags": "Tags", "tracing_configuration": "TracingConfiguration", "value": "Value", "version": "Version", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ "/properties/Definition", "/properties/DefinitionS3Location", "/properties/DefinitionSubstitutions", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }