// Code generated by generators/resource/main.go; DO NOT EDIT. package ecs 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_ecs_primary_task_set", primaryTaskSetResourceType) } // primaryTaskSetResourceType returns the Terraform awscc_ecs_primary_task_set resource type. // This Terraform resource type corresponds to the CloudFormation AWS::ECS::PrimaryTaskSet resource type. func primaryTaskSetResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "cluster": { // Property: Cluster // CloudFormation resource type schema: // { // "description": "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.", // "type": "string" // } Description: "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "service": { // Property: Service // CloudFormation resource type schema: // { // "description": "The short name or full Amazon Resource Name (ARN) of the service to create the task set in.", // "type": "string" // } Description: "The short name or full Amazon Resource Name (ARN) of the service to create the task set in.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "task_set_id": { // Property: TaskSetId // CloudFormation resource type schema: // { // "description": "The ID or full Amazon Resource Name (ARN) of the task set.", // "type": "string" // } Description: "The ID or full Amazon Resource Name (ARN) of the task set.", Type: types.StringType, Required: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "A pseudo-resource that manages which of your ECS task sets is primary.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ECS::PrimaryTaskSet").WithTerraformTypeName("awscc_ecs_primary_task_set") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster": "Cluster", "service": "Service", "task_set_id": "TaskSetId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }