// Code generated by generators/resource/main.go; DO NOT EDIT. package location import ( "context" "regexp" "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_location_tracker_consumer", trackerConsumerResourceType) } // trackerConsumerResourceType returns the Terraform awscc_location_tracker_consumer resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Location::TrackerConsumer resource type. func trackerConsumerResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "consumer_arn": { // Property: ConsumerArn // CloudFormation resource type schema: // { // "maxLength": 1600, // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(1600), validate.StringMatch(regexp.MustCompile("^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "tracker_name": { // Property: TrackerName // CloudFormation resource type schema: // { // "maxLength": 100, // "minLength": 1, // "pattern": "^[-._\\w]+$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 100), validate.StringMatch(regexp.MustCompile("^[-._\\w]+$"), ""), }, 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::Location::TrackerConsumer Resource Type", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Location::TrackerConsumer").WithTerraformTypeName("awscc_location_tracker_consumer") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "consumer_arn": "ConsumerArn", "tracker_name": "TrackerName", }) opts = opts.IsImmutableType(true) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }