// Code generated by generators/resource/main.go; DO NOT EDIT. package ec2 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_ec2_ec2_fleet", eC2FleetResourceType) } // eC2FleetResourceType returns the Terraform awscc_ec2_ec2_fleet resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EC2::EC2Fleet resource type. func eC2FleetResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "context": { // Property: Context // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, "excess_capacity_termination_policy": { // Property: ExcessCapacityTerminationPolicy // CloudFormation resource type schema: // { // "enum": [ // "termination", // "no-termination" // ], // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "termination", "no-termination", }), }, }, "fleet_id": { // Property: FleetId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "launch_template_configs": { // Property: LaunchTemplateConfigs // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "LaunchTemplateSpecification": { // "additionalProperties": false, // "properties": { // "LaunchTemplateId": { // "type": "string" // }, // "LaunchTemplateName": { // "maxLength": 128, // "minLength": 3, // "pattern": "[a-zA-Z0-9\\(\\)\\.\\-/_]+", // "type": "string" // }, // "Version": { // "type": "string" // } // }, // "type": "object" // }, // "Overrides": { // "items": { // "additionalProperties": false, // "properties": { // "AvailabilityZone": { // "type": "string" // }, // "InstanceRequirements": { // "additionalProperties": false, // "properties": { // "AcceleratorCount": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // }, // "AcceleratorManufacturers": { // "items": { // "enum": [ // "nvidia", // "amd", // "amazon-web-services", // "xilinx" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "AcceleratorNames": { // "items": { // "enum": [ // "a100", // "v100", // "k80", // "t4", // "m60", // "radeon-pro-v520", // "vu9p", // "inferentia", // "k520" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "AcceleratorTotalMemoryMiB": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // }, // "AcceleratorTypes": { // "items": { // "enum": [ // "gpu", // "fpga", // "inference" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "BareMetal": { // "enum": [ // "included", // "required", // "excluded" // ], // "type": "string" // }, // "BaselineEbsBandwidthMbps": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // }, // "BurstablePerformance": { // "enum": [ // "included", // "required", // "excluded" // ], // "type": "string" // }, // "CpuManufacturers": { // "items": { // "enum": [ // "intel", // "amd", // "amazon-web-services" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "ExcludedInstanceTypes": { // "items": { // "maxLength": 30, // "minLength": 1, // "pattern": "[a-zA-Z0-9\\.\\*]+", // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "InstanceGenerations": { // "items": { // "enum": [ // "current", // "previous" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "LocalStorage": { // "enum": [ // "included", // "required", // "excluded" // ], // "type": "string" // }, // "LocalStorageTypes": { // "items": { // "enum": [ // "hdd", // "ssd" // ], // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "MemoryGiBPerVCpu": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "number" // }, // "Min": { // "type": "number" // } // }, // "type": "object" // }, // "MemoryMiB": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // }, // "NetworkInterfaceCount": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // }, // "OnDemandMaxPricePercentageOverLowestPrice": { // "type": "integer" // }, // "RequireHibernateSupport": { // "type": "boolean" // }, // "SpotMaxPricePercentageOverLowestPrice": { // "type": "integer" // }, // "TotalLocalStorageGB": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "number" // }, // "Min": { // "type": "number" // } // }, // "type": "object" // }, // "VCpuCount": { // "additionalProperties": false, // "properties": { // "Max": { // "type": "integer" // }, // "Min": { // "type": "integer" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "InstanceType": { // "type": "string" // }, // "MaxPrice": { // "type": "string" // }, // "Placement": { // "additionalProperties": false, // "properties": { // "Affinity": { // "type": "string" // }, // "AvailabilityZone": { // "type": "string" // }, // "GroupName": { // "type": "string" // }, // "HostId": { // "type": "string" // }, // "HostResourceGroupArn": { // "type": "string" // }, // "PartitionNumber": { // "type": "integer" // }, // "SpreadDomain": { // "type": "string" // }, // "Tenancy": { // "type": "string" // } // }, // "type": "object" // }, // "Priority": { // "type": "number" // }, // "SubnetId": { // "type": "string" // }, // "WeightedCapacity": { // "type": "number" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // } // }, // "type": "object" // }, // "maxItems": 50, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "launch_template_specification": { // Property: LaunchTemplateSpecification Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "launch_template_id": { // Property: LaunchTemplateId Type: types.StringType, Optional: true, }, "launch_template_name": { // Property: LaunchTemplateName Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(3, 128), validate.StringMatch(regexp.MustCompile("[a-zA-Z0-9\\(\\)\\.\\-/_]+"), ""), }, }, "version": { // Property: Version Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "overrides": { // Property: Overrides Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "availability_zone": { // Property: AvailabilityZone Type: types.StringType, Optional: true, }, "instance_requirements": { // Property: InstanceRequirements Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "accelerator_count": { // Property: AcceleratorCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, "accelerator_manufacturers": { // Property: AcceleratorManufacturers Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "nvidia", "amd", "amazon-web-services", "xilinx", })), }, }, "accelerator_names": { // Property: AcceleratorNames Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "a100", "v100", "k80", "t4", "m60", "radeon-pro-v520", "vu9p", "inferentia", "k520", })), }, }, "accelerator_total_memory_mi_b": { // Property: AcceleratorTotalMemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, "accelerator_types": { // Property: AcceleratorTypes Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "gpu", "fpga", "inference", })), }, }, "bare_metal": { // Property: BareMetal Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "included", "required", "excluded", }), }, }, "baseline_ebs_bandwidth_mbps": { // Property: BaselineEbsBandwidthMbps Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, "burstable_performance": { // Property: BurstablePerformance Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "included", "required", "excluded", }), }, }, "cpu_manufacturers": { // Property: CpuManufacturers Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "intel", "amd", "amazon-web-services", })), }, }, "excluded_instance_types": { // Property: ExcludedInstanceTypes Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringLenBetween(1, 30)), validate.ArrayForEach(validate.StringMatch(regexp.MustCompile("[a-zA-Z0-9\\.\\*]+"), "")), }, }, "instance_generations": { // Property: InstanceGenerations Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "current", "previous", })), }, }, "local_storage": { // Property: LocalStorage Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "included", "required", "excluded", }), }, }, "local_storage_types": { // Property: LocalStorageTypes Type: types.ListType{ElemType: types.StringType}, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayForEach(validate.StringInSlice([]string{ "hdd", "ssd", })), }, }, "memory_gi_b_per_v_cpu": { // Property: MemoryGiBPerVCpu Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Optional: true, }, "min": { // Property: Min Type: types.Float64Type, Optional: true, }, }, ), Optional: true, }, "memory_mi_b": { // Property: MemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, "network_interface_count": { // Property: NetworkInterfaceCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, "on_demand_max_price_percentage_over_lowest_price": { // Property: OnDemandMaxPricePercentageOverLowestPrice Type: types.Int64Type, Optional: true, }, "require_hibernate_support": { // Property: RequireHibernateSupport Type: types.BoolType, Optional: true, }, "spot_max_price_percentage_over_lowest_price": { // Property: SpotMaxPricePercentageOverLowestPrice Type: types.Int64Type, Optional: true, }, "total_local_storage_gb": { // Property: TotalLocalStorageGB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Optional: true, }, "min": { // Property: Min Type: types.Float64Type, Optional: true, }, }, ), Optional: true, }, "v_cpu_count": { // Property: VCpuCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Optional: true, }, "min": { // Property: Min Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, }, ), Optional: true, }, "instance_type": { // Property: InstanceType Type: types.StringType, Optional: true, }, "max_price": { // Property: MaxPrice Type: types.StringType, Optional: true, }, "placement": { // Property: Placement Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "affinity": { // Property: Affinity Type: types.StringType, Optional: true, }, "availability_zone": { // Property: AvailabilityZone Type: types.StringType, Optional: true, }, "group_name": { // Property: GroupName Type: types.StringType, Optional: true, }, "host_id": { // Property: HostId Type: types.StringType, Optional: true, }, "host_resource_group_arn": { // Property: HostResourceGroupArn Type: types.StringType, Optional: true, }, "partition_number": { // Property: PartitionNumber Type: types.Int64Type, Optional: true, }, "spread_domain": { // Property: SpreadDomain Type: types.StringType, Optional: true, }, "tenancy": { // Property: Tenancy Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "priority": { // Property: Priority Type: types.Float64Type, Optional: true, }, "subnet_id": { // Property: SubnetId Type: types.StringType, Optional: true, }, "weighted_capacity": { // Property: WeightedCapacity Type: types.Float64Type, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Required: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtMost(50), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "on_demand_options": { // Property: OnDemandOptions // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "AllocationStrategy": { // "type": "string" // }, // "CapacityReservationOptions": { // "additionalProperties": false, // "properties": { // "UsageStrategy": { // "enum": [ // "use-capacity-reservations-first" // ], // "type": "string" // } // }, // "type": "object" // }, // "MaxTotalPrice": { // "type": "string" // }, // "MinTargetCapacity": { // "type": "integer" // }, // "SingleAvailabilityZone": { // "type": "boolean" // }, // "SingleInstanceType": { // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "allocation_strategy": { // Property: AllocationStrategy Type: types.StringType, Optional: true, }, "capacity_reservation_options": { // Property: CapacityReservationOptions Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "usage_strategy": { // Property: UsageStrategy Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "use-capacity-reservations-first", }), }, }, }, ), Optional: true, }, "max_total_price": { // Property: MaxTotalPrice Type: types.StringType, Optional: true, }, "min_target_capacity": { // Property: MinTargetCapacity Type: types.Int64Type, Optional: true, }, "single_availability_zone": { // Property: SingleAvailabilityZone Type: types.BoolType, Optional: true, }, "single_instance_type": { // Property: SingleInstanceType Type: types.BoolType, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "replace_unhealthy_instances": { // Property: ReplaceUnhealthyInstances // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "spot_options": { // Property: SpotOptions // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "AllocationStrategy": { // "enum": [ // "lowestPrice", // "diversified", // "capacityOptimized", // "capacityOptimizedPrioritized" // ], // "type": "string" // }, // "InstanceInterruptionBehavior": { // "enum": [ // "hibernate", // "stop", // "terminate" // ], // "type": "string" // }, // "InstancePoolsToUseCount": { // "type": "integer" // }, // "MaintenanceStrategies": { // "additionalProperties": false, // "properties": { // "CapacityRebalance": { // "additionalProperties": false, // "properties": { // "ReplacementStrategy": { // "enum": [ // "launch", // "launch-before-terminate" // ], // "type": "string" // }, // "TerminationDelay": { // "type": "integer" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "MaxTotalPrice": { // "type": "string" // }, // "MinTargetCapacity": { // "type": "integer" // }, // "SingleAvailabilityZone": { // "type": "boolean" // }, // "SingleInstanceType": { // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "allocation_strategy": { // Property: AllocationStrategy Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "lowestPrice", "diversified", "capacityOptimized", "capacityOptimizedPrioritized", }), }, }, "instance_interruption_behavior": { // Property: InstanceInterruptionBehavior Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "hibernate", "stop", "terminate", }), }, }, "instance_pools_to_use_count": { // Property: InstancePoolsToUseCount Type: types.Int64Type, Optional: true, }, "maintenance_strategies": { // Property: MaintenanceStrategies Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "capacity_rebalance": { // Property: CapacityRebalance Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "replacement_strategy": { // Property: ReplacementStrategy Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "launch", "launch-before-terminate", }), }, }, "termination_delay": { // Property: TerminationDelay Type: types.Int64Type, Optional: true, }, }, ), Optional: true, }, }, ), Optional: true, }, "max_total_price": { // Property: MaxTotalPrice Type: types.StringType, Optional: true, }, "min_target_capacity": { // Property: MinTargetCapacity Type: types.Int64Type, Optional: true, }, "single_availability_zone": { // Property: SingleAvailabilityZone Type: types.BoolType, Optional: true, }, "single_instance_type": { // Property: SingleInstanceType Type: types.BoolType, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "tag_specifications": { // Property: TagSpecifications // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "ResourceType": { // "enum": [ // "client-vpn-endpoint", // "customer-gateway", // "dedicated-host", // "dhcp-options", // "egress-only-internet-gateway", // "elastic-gpu", // "elastic-ip", // "export-image-task", // "export-instance-task", // "fleet", // "fpga-image", // "host-reservation", // "image", // "import-image-task", // "import-snapshot-task", // "instance", // "internet-gateway", // "key-pair", // "launch-template", // "local-gateway-route-table-vpc-association", // "natgateway", // "network-acl", // "network-insights-analysis", // "network-insights-path", // "network-interface", // "placement-group", // "reserved-instances", // "route-table", // "security-group", // "snapshot", // "spot-fleet-request", // "spot-instances-request", // "subnet", // "traffic-mirror-filter", // "traffic-mirror-session", // "traffic-mirror-target", // "transit-gateway", // "transit-gateway-attachment", // "transit-gateway-connect-peer", // "transit-gateway-multicast-domain", // "transit-gateway-route-table", // "volume", // "vpc", // "vpc-flow-log", // "vpc-peering-connection", // "vpn-connection", // "vpn-gateway" // ], // "type": "string" // }, // "Tags": { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "resource_type": { // Property: ResourceType Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-flow-log", "vpc-peering-connection", "vpn-connection", "vpn-gateway", }), }, }, "tags": { // Property: Tags Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, }, "value": { // Property: Value Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "target_capacity_specification": { // Property: TargetCapacitySpecification // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "DefaultTargetCapacityType": { // "enum": [ // "on-demand", // "spot" // ], // "type": "string" // }, // "OnDemandTargetCapacity": { // "type": "integer" // }, // "SpotTargetCapacity": { // "type": "integer" // }, // "TargetCapacityUnitType": { // "enum": [ // "vcpu", // "memory-mib", // "units" // ], // "type": "string" // }, // "TotalTargetCapacity": { // "type": "integer" // } // }, // "required": [ // "TotalTargetCapacity" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "default_target_capacity_type": { // Property: DefaultTargetCapacityType Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "on-demand", "spot", }), }, }, "on_demand_target_capacity": { // Property: OnDemandTargetCapacity Type: types.Int64Type, Optional: true, }, "spot_target_capacity": { // Property: SpotTargetCapacity Type: types.Int64Type, Optional: true, }, "target_capacity_unit_type": { // Property: TargetCapacityUnitType Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "vcpu", "memory-mib", "units", }), }, }, "total_target_capacity": { // Property: TotalTargetCapacity Type: types.Int64Type, Required: true, }, }, ), Required: true, }, "terminate_instances_with_expiration": { // Property: TerminateInstancesWithExpiration // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "enum": [ // "maintain", // "request", // "instant" // ], // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "maintain", "request", "instant", }), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "valid_from": { // Property: ValidFrom // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "valid_until": { // Property: ValidUntil // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), 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::EC2::EC2Fleet", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::EC2Fleet").WithTerraformTypeName("awscc_ec2_ec2_fleet") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", "accelerator_names": "AcceleratorNames", "accelerator_total_memory_mi_b": "AcceleratorTotalMemoryMiB", "accelerator_types": "AcceleratorTypes", "affinity": "Affinity", "allocation_strategy": "AllocationStrategy", "availability_zone": "AvailabilityZone", "bare_metal": "BareMetal", "baseline_ebs_bandwidth_mbps": "BaselineEbsBandwidthMbps", "burstable_performance": "BurstablePerformance", "capacity_rebalance": "CapacityRebalance", "capacity_reservation_options": "CapacityReservationOptions", "context": "Context", "cpu_manufacturers": "CpuManufacturers", "default_target_capacity_type": "DefaultTargetCapacityType", "excess_capacity_termination_policy": "ExcessCapacityTerminationPolicy", "excluded_instance_types": "ExcludedInstanceTypes", "fleet_id": "FleetId", "group_name": "GroupName", "host_id": "HostId", "host_resource_group_arn": "HostResourceGroupArn", "instance_generations": "InstanceGenerations", "instance_interruption_behavior": "InstanceInterruptionBehavior", "instance_pools_to_use_count": "InstancePoolsToUseCount", "instance_requirements": "InstanceRequirements", "instance_type": "InstanceType", "key": "Key", "launch_template_configs": "LaunchTemplateConfigs", "launch_template_id": "LaunchTemplateId", "launch_template_name": "LaunchTemplateName", "launch_template_specification": "LaunchTemplateSpecification", "local_storage": "LocalStorage", "local_storage_types": "LocalStorageTypes", "maintenance_strategies": "MaintenanceStrategies", "max": "Max", "max_price": "MaxPrice", "max_total_price": "MaxTotalPrice", "memory_gi_b_per_v_cpu": "MemoryGiBPerVCpu", "memory_mi_b": "MemoryMiB", "min": "Min", "min_target_capacity": "MinTargetCapacity", "network_interface_count": "NetworkInterfaceCount", "on_demand_max_price_percentage_over_lowest_price": "OnDemandMaxPricePercentageOverLowestPrice", "on_demand_options": "OnDemandOptions", "on_demand_target_capacity": "OnDemandTargetCapacity", "overrides": "Overrides", "partition_number": "PartitionNumber", "placement": "Placement", "priority": "Priority", "replace_unhealthy_instances": "ReplaceUnhealthyInstances", "replacement_strategy": "ReplacementStrategy", "require_hibernate_support": "RequireHibernateSupport", "resource_type": "ResourceType", "single_availability_zone": "SingleAvailabilityZone", "single_instance_type": "SingleInstanceType", "spot_max_price_percentage_over_lowest_price": "SpotMaxPricePercentageOverLowestPrice", "spot_options": "SpotOptions", "spot_target_capacity": "SpotTargetCapacity", "spread_domain": "SpreadDomain", "subnet_id": "SubnetId", "tag_specifications": "TagSpecifications", "tags": "Tags", "target_capacity_specification": "TargetCapacitySpecification", "target_capacity_unit_type": "TargetCapacityUnitType", "tenancy": "Tenancy", "terminate_instances_with_expiration": "TerminateInstancesWithExpiration", "termination_delay": "TerminationDelay", "total_local_storage_gb": "TotalLocalStorageGB", "total_target_capacity": "TotalTargetCapacity", "type": "Type", "usage_strategy": "UsageStrategy", "v_cpu_count": "VCpuCount", "valid_from": "ValidFrom", "valid_until": "ValidUntil", "value": "Value", "version": "Version", "weighted_capacity": "WeightedCapacity", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }