// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package ec2 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.AddDataSourceTypeFactory("awscc_ec2_spot_fleet", spotFleetDataSourceType) } // spotFleetDataSourceType returns the Terraform awscc_ec2_spot_fleet data source type. // This Terraform data source type corresponds to the CloudFormation AWS::EC2::SpotFleet resource type. func spotFleetDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "spot_fleet_request_config_data": { // Property: SpotFleetRequestConfigData // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "AllocationStrategy": { // "enum": [ // "capacityOptimized", // "capacityOptimizedPrioritized", // "diversified", // "lowestPrice" // ], // "type": "string" // }, // "Context": { // "type": "string" // }, // "ExcessCapacityTerminationPolicy": { // "enum": [ // "Default", // "NoTermination", // "default", // "noTermination" // ], // "type": "string" // }, // "IamFleetRole": { // "type": "string" // }, // "InstanceInterruptionBehavior": { // "enum": [ // "hibernate", // "stop", // "terminate" // ], // "type": "string" // }, // "InstancePoolsToUseCount": { // "type": "integer" // }, // "LaunchSpecifications": { // "items": { // "additionalProperties": false, // "properties": { // "BlockDeviceMappings": { // "items": { // "additionalProperties": false, // "properties": { // "DeviceName": { // "type": "string" // }, // "Ebs": { // "additionalProperties": false, // "properties": { // "DeleteOnTermination": { // "type": "boolean" // }, // "Encrypted": { // "type": "boolean" // }, // "Iops": { // "type": "integer" // }, // "SnapshotId": { // "type": "string" // }, // "VolumeSize": { // "type": "integer" // }, // "VolumeType": { // "enum": [ // "gp2", // "gp3", // "io1", // "io2", // "sc1", // "st1", // "standard" // ], // "type": "string" // } // }, // "type": "object" // }, // "NoDevice": { // "type": "string" // }, // "VirtualName": { // "type": "string" // } // }, // "required": [ // "DeviceName" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "EbsOptimized": { // "default": false, // "type": "boolean" // }, // "IamInstanceProfile": { // "additionalProperties": false, // "properties": { // "Arn": { // "type": "string" // } // }, // "type": "object" // }, // "ImageId": { // "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" // }, // "KernelId": { // "type": "string" // }, // "KeyName": { // "type": "string" // }, // "Monitoring": { // "additionalProperties": false, // "properties": { // "Enabled": { // "default": false, // "type": "boolean" // } // }, // "type": "object" // }, // "NetworkInterfaces": { // "items": { // "additionalProperties": false, // "properties": { // "AssociatePublicIpAddress": { // "type": "boolean" // }, // "DeleteOnTermination": { // "type": "boolean" // }, // "Description": { // "type": "string" // }, // "DeviceIndex": { // "type": "integer" // }, // "Groups": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // }, // "Ipv6AddressCount": { // "type": "integer" // }, // "Ipv6Addresses": { // "items": { // "additionalProperties": false, // "properties": { // "Ipv6Address": { // "type": "string" // } // }, // "required": [ // "Ipv6Address" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "NetworkInterfaceId": { // "type": "string" // }, // "PrivateIpAddresses": { // "items": { // "additionalProperties": false, // "properties": { // "Primary": { // "type": "boolean" // }, // "PrivateIpAddress": { // "type": "string" // } // }, // "required": [ // "PrivateIpAddress" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "SecondaryPrivateIpAddressCount": { // "type": "integer" // }, // "SubnetId": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "Placement": { // "additionalProperties": false, // "properties": { // "AvailabilityZone": { // "type": "string" // }, // "GroupName": { // "type": "string" // }, // "Tenancy": { // "enum": [ // "dedicated", // "default", // "host" // ], // "type": "string" // } // }, // "type": "object" // }, // "RamdiskId": { // "type": "string" // }, // "SecurityGroups": { // "items": { // "additionalProperties": false, // "properties": { // "GroupId": { // "type": "string" // } // }, // "required": [ // "GroupId" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "SpotPrice": { // "type": "string" // }, // "SubnetId": { // "type": "string" // }, // "TagSpecifications": { // "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": true // }, // "UserData": { // "type": "string" // }, // "WeightedCapacity": { // "type": "number" // } // }, // "required": [ // "ImageId" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "LaunchTemplateConfigs": { // "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" // } // }, // "required": [ // "Version" // ], // "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" // }, // "Priority": { // "type": "number" // }, // "SpotPrice": { // "type": "string" // }, // "SubnetId": { // "type": "string" // }, // "WeightedCapacity": { // "type": "number" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "LoadBalancersConfig": { // "additionalProperties": false, // "properties": { // "ClassicLoadBalancersConfig": { // "additionalProperties": false, // "properties": { // "ClassicLoadBalancers": { // "items": { // "additionalProperties": false, // "properties": { // "Name": { // "type": "string" // } // }, // "required": [ // "Name" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } // }, // "required": [ // "ClassicLoadBalancers" // ], // "type": "object" // }, // "TargetGroupsConfig": { // "additionalProperties": false, // "properties": { // "TargetGroups": { // "items": { // "additionalProperties": false, // "properties": { // "Arn": { // "type": "string" // } // }, // "required": [ // "Arn" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } // }, // "required": [ // "TargetGroups" // ], // "type": "object" // } // }, // "type": "object" // }, // "OnDemandAllocationStrategy": { // "type": "string" // }, // "OnDemandMaxTotalPrice": { // "type": "string" // }, // "OnDemandTargetCapacity": { // "type": "integer" // }, // "ReplaceUnhealthyInstances": { // "type": "boolean" // }, // "SpotMaintenanceStrategies": { // "additionalProperties": false, // "properties": { // "CapacityRebalance": { // "additionalProperties": false, // "properties": { // "ReplacementStrategy": { // "enum": [ // "launch", // "launch-before-terminate" // ], // "type": "string" // }, // "TerminationDelay": { // "type": "integer" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "SpotMaxTotalPrice": { // "type": "string" // }, // "SpotPrice": { // "type": "string" // }, // "TargetCapacity": { // "type": "integer" // }, // "TargetCapacityUnitType": { // "enum": [ // "vcpu", // "memory-mib", // "units" // ], // "type": "string" // }, // "TerminateInstancesWithExpiration": { // "type": "boolean" // }, // "Type": { // "enum": [ // "maintain", // "request" // ], // "type": "string" // }, // "ValidFrom": { // "type": "string" // }, // "ValidUntil": { // "type": "string" // } // }, // "required": [ // "IamFleetRole", // "TargetCapacity" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "allocation_strategy": { // Property: AllocationStrategy Type: types.StringType, Computed: true, }, "context": { // Property: Context Type: types.StringType, Computed: true, }, "excess_capacity_termination_policy": { // Property: ExcessCapacityTerminationPolicy Type: types.StringType, Computed: true, }, "iam_fleet_role": { // Property: IamFleetRole Type: types.StringType, Computed: true, }, "instance_interruption_behavior": { // Property: InstanceInterruptionBehavior Type: types.StringType, Computed: true, }, "instance_pools_to_use_count": { // Property: InstancePoolsToUseCount Type: types.Int64Type, Computed: true, }, "launch_specifications": { // Property: LaunchSpecifications Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "block_device_mappings": { // Property: BlockDeviceMappings Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "device_name": { // Property: DeviceName Type: types.StringType, Computed: true, }, "ebs": { // Property: Ebs Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "delete_on_termination": { // Property: DeleteOnTermination Type: types.BoolType, Computed: true, }, "encrypted": { // Property: Encrypted Type: types.BoolType, Computed: true, }, "iops": { // Property: Iops Type: types.Int64Type, Computed: true, }, "snapshot_id": { // Property: SnapshotId Type: types.StringType, Computed: true, }, "volume_size": { // Property: VolumeSize Type: types.Int64Type, Computed: true, }, "volume_type": { // Property: VolumeType Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "no_device": { // Property: NoDevice Type: types.StringType, Computed: true, }, "virtual_name": { // Property: VirtualName Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "ebs_optimized": { // Property: EbsOptimized Type: types.BoolType, Computed: true, }, "iam_instance_profile": { // Property: IamInstanceProfile Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "arn": { // Property: Arn Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "image_id": { // Property: ImageId Type: types.StringType, Computed: 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, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "accelerator_manufacturers": { // Property: AcceleratorManufacturers Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "accelerator_names": { // Property: AcceleratorNames Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "accelerator_total_memory_mi_b": { // Property: AcceleratorTotalMemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "accelerator_types": { // Property: AcceleratorTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "bare_metal": { // Property: BareMetal Type: types.StringType, Computed: true, }, "baseline_ebs_bandwidth_mbps": { // Property: BaselineEbsBandwidthMbps Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "burstable_performance": { // Property: BurstablePerformance Type: types.StringType, Computed: true, }, "cpu_manufacturers": { // Property: CpuManufacturers Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "excluded_instance_types": { // Property: ExcludedInstanceTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "instance_generations": { // Property: InstanceGenerations Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "local_storage": { // Property: LocalStorage Type: types.StringType, Computed: true, }, "local_storage_types": { // Property: LocalStorageTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "memory_gi_b_per_v_cpu": { // Property: MemoryGiBPerVCpu Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Computed: true, }, "min": { // Property: Min Type: types.Float64Type, Computed: true, }, }, ), Computed: true, }, "memory_mi_b": { // Property: MemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "network_interface_count": { // Property: NetworkInterfaceCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "on_demand_max_price_percentage_over_lowest_price": { // Property: OnDemandMaxPricePercentageOverLowestPrice Type: types.Int64Type, Computed: true, }, "require_hibernate_support": { // Property: RequireHibernateSupport Type: types.BoolType, Computed: true, }, "spot_max_price_percentage_over_lowest_price": { // Property: SpotMaxPricePercentageOverLowestPrice Type: types.Int64Type, Computed: true, }, "total_local_storage_gb": { // Property: TotalLocalStorageGB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Computed: true, }, "min": { // Property: Min Type: types.Float64Type, Computed: true, }, }, ), Computed: true, }, "v_cpu_count": { // Property: VCpuCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, }, ), Computed: true, }, "instance_type": { // Property: InstanceType Type: types.StringType, Computed: true, }, "kernel_id": { // Property: KernelId Type: types.StringType, Computed: true, }, "key_name": { // Property: KeyName Type: types.StringType, Computed: true, }, "monitoring": { // Property: Monitoring Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "enabled": { // Property: Enabled Type: types.BoolType, Computed: true, }, }, ), Computed: true, }, "network_interfaces": { // Property: NetworkInterfaces Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "associate_public_ip_address": { // Property: AssociatePublicIpAddress Type: types.BoolType, Computed: true, }, "delete_on_termination": { // Property: DeleteOnTermination Type: types.BoolType, Computed: true, }, "description": { // Property: Description Type: types.StringType, Computed: true, }, "device_index": { // Property: DeviceIndex Type: types.Int64Type, Computed: true, }, "groups": { // Property: Groups Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "ipv_6_address_count": { // Property: Ipv6AddressCount Type: types.Int64Type, Computed: true, }, "ipv_6_addresses": { // Property: Ipv6Addresses Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "ipv_6_address": { // Property: Ipv6Address Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "network_interface_id": { // Property: NetworkInterfaceId Type: types.StringType, Computed: true, }, "private_ip_addresses": { // Property: PrivateIpAddresses Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "primary": { // Property: Primary Type: types.BoolType, Computed: true, }, "private_ip_address": { // Property: PrivateIpAddress Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "secondary_private_ip_address_count": { // Property: SecondaryPrivateIpAddressCount Type: types.Int64Type, Computed: true, }, "subnet_id": { // Property: SubnetId Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "placement": { // Property: Placement Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "availability_zone": { // Property: AvailabilityZone Type: types.StringType, Computed: true, }, "group_name": { // Property: GroupName Type: types.StringType, Computed: true, }, "tenancy": { // Property: Tenancy Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "ramdisk_id": { // Property: RamdiskId Type: types.StringType, Computed: true, }, "security_groups": { // Property: SecurityGroups Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "group_id": { // Property: GroupId Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "spot_price": { // Property: SpotPrice Type: types.StringType, Computed: true, }, "subnet_id": { // Property: SubnetId Type: types.StringType, Computed: true, }, "tag_specifications": { // Property: TagSpecifications Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "resource_type": { // Property: ResourceType Type: types.StringType, Computed: true, }, "tags": { // Property: Tags Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "user_data": { // Property: UserData Type: types.StringType, Computed: true, }, "weighted_capacity": { // Property: WeightedCapacity Type: types.Float64Type, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "launch_template_configs": { // Property: LaunchTemplateConfigs 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, Computed: true, }, "launch_template_name": { // Property: LaunchTemplateName Type: types.StringType, Computed: true, }, "version": { // Property: Version Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "overrides": { // Property: Overrides Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "availability_zone": { // Property: AvailabilityZone Type: types.StringType, Computed: 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, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "accelerator_manufacturers": { // Property: AcceleratorManufacturers Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "accelerator_names": { // Property: AcceleratorNames Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "accelerator_total_memory_mi_b": { // Property: AcceleratorTotalMemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "accelerator_types": { // Property: AcceleratorTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "bare_metal": { // Property: BareMetal Type: types.StringType, Computed: true, }, "baseline_ebs_bandwidth_mbps": { // Property: BaselineEbsBandwidthMbps Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "burstable_performance": { // Property: BurstablePerformance Type: types.StringType, Computed: true, }, "cpu_manufacturers": { // Property: CpuManufacturers Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "excluded_instance_types": { // Property: ExcludedInstanceTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "instance_generations": { // Property: InstanceGenerations Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "local_storage": { // Property: LocalStorage Type: types.StringType, Computed: true, }, "local_storage_types": { // Property: LocalStorageTypes Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "memory_gi_b_per_v_cpu": { // Property: MemoryGiBPerVCpu Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Computed: true, }, "min": { // Property: Min Type: types.Float64Type, Computed: true, }, }, ), Computed: true, }, "memory_mi_b": { // Property: MemoryMiB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "network_interface_count": { // Property: NetworkInterfaceCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "on_demand_max_price_percentage_over_lowest_price": { // Property: OnDemandMaxPricePercentageOverLowestPrice Type: types.Int64Type, Computed: true, }, "require_hibernate_support": { // Property: RequireHibernateSupport Type: types.BoolType, Computed: true, }, "spot_max_price_percentage_over_lowest_price": { // Property: SpotMaxPricePercentageOverLowestPrice Type: types.Int64Type, Computed: true, }, "total_local_storage_gb": { // Property: TotalLocalStorageGB Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Float64Type, Computed: true, }, "min": { // Property: Min Type: types.Float64Type, Computed: true, }, }, ), Computed: true, }, "v_cpu_count": { // Property: VCpuCount Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "max": { // Property: Max Type: types.Int64Type, Computed: true, }, "min": { // Property: Min Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, }, ), Computed: true, }, "instance_type": { // Property: InstanceType Type: types.StringType, Computed: true, }, "priority": { // Property: Priority Type: types.Float64Type, Computed: true, }, "spot_price": { // Property: SpotPrice Type: types.StringType, Computed: true, }, "subnet_id": { // Property: SubnetId Type: types.StringType, Computed: true, }, "weighted_capacity": { // Property: WeightedCapacity Type: types.Float64Type, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "load_balancers_config": { // Property: LoadBalancersConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "classic_load_balancers_config": { // Property: ClassicLoadBalancersConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "classic_load_balancers": { // Property: ClassicLoadBalancers Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "name": { // Property: Name Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, ), Computed: true, }, "target_groups_config": { // Property: TargetGroupsConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "target_groups": { // Property: TargetGroups Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "arn": { // Property: Arn Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, ), Computed: true, }, }, ), Computed: true, }, "on_demand_allocation_strategy": { // Property: OnDemandAllocationStrategy Type: types.StringType, Computed: true, }, "on_demand_max_total_price": { // Property: OnDemandMaxTotalPrice Type: types.StringType, Computed: true, }, "on_demand_target_capacity": { // Property: OnDemandTargetCapacity Type: types.Int64Type, Computed: true, }, "replace_unhealthy_instances": { // Property: ReplaceUnhealthyInstances Type: types.BoolType, Computed: true, }, "spot_maintenance_strategies": { // Property: SpotMaintenanceStrategies 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, Computed: true, }, "termination_delay": { // Property: TerminationDelay Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, }, ), Computed: true, }, "spot_max_total_price": { // Property: SpotMaxTotalPrice Type: types.StringType, Computed: true, }, "spot_price": { // Property: SpotPrice Type: types.StringType, Computed: true, }, "target_capacity": { // Property: TargetCapacity Type: types.Int64Type, Computed: true, }, "target_capacity_unit_type": { // Property: TargetCapacityUnitType Type: types.StringType, Computed: true, }, "terminate_instances_with_expiration": { // Property: TerminateInstancesWithExpiration Type: types.BoolType, Computed: true, }, "type": { // Property: Type Type: types.StringType, Computed: true, }, "valid_from": { // Property: ValidFrom Type: types.StringType, Computed: true, }, "valid_until": { // Property: ValidUntil Type: types.StringType, Computed: true, }, }, ), Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::EC2::SpotFleet", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::SpotFleet").WithTerraformTypeName("awscc_ec2_spot_fleet") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", "accelerator_names": "AcceleratorNames", "accelerator_total_memory_mi_b": "AcceleratorTotalMemoryMiB", "accelerator_types": "AcceleratorTypes", "allocation_strategy": "AllocationStrategy", "arn": "Arn", "associate_public_ip_address": "AssociatePublicIpAddress", "availability_zone": "AvailabilityZone", "bare_metal": "BareMetal", "baseline_ebs_bandwidth_mbps": "BaselineEbsBandwidthMbps", "block_device_mappings": "BlockDeviceMappings", "burstable_performance": "BurstablePerformance", "capacity_rebalance": "CapacityRebalance", "classic_load_balancers": "ClassicLoadBalancers", "classic_load_balancers_config": "ClassicLoadBalancersConfig", "context": "Context", "cpu_manufacturers": "CpuManufacturers", "delete_on_termination": "DeleteOnTermination", "description": "Description", "device_index": "DeviceIndex", "device_name": "DeviceName", "ebs": "Ebs", "ebs_optimized": "EbsOptimized", "enabled": "Enabled", "encrypted": "Encrypted", "excess_capacity_termination_policy": "ExcessCapacityTerminationPolicy", "excluded_instance_types": "ExcludedInstanceTypes", "group_id": "GroupId", "group_name": "GroupName", "groups": "Groups", "iam_fleet_role": "IamFleetRole", "iam_instance_profile": "IamInstanceProfile", "id": "Id", "image_id": "ImageId", "instance_generations": "InstanceGenerations", "instance_interruption_behavior": "InstanceInterruptionBehavior", "instance_pools_to_use_count": "InstancePoolsToUseCount", "instance_requirements": "InstanceRequirements", "instance_type": "InstanceType", "iops": "Iops", "ipv_6_address": "Ipv6Address", "ipv_6_address_count": "Ipv6AddressCount", "ipv_6_addresses": "Ipv6Addresses", "kernel_id": "KernelId", "key": "Key", "key_name": "KeyName", "launch_specifications": "LaunchSpecifications", "launch_template_configs": "LaunchTemplateConfigs", "launch_template_id": "LaunchTemplateId", "launch_template_name": "LaunchTemplateName", "launch_template_specification": "LaunchTemplateSpecification", "load_balancers_config": "LoadBalancersConfig", "local_storage": "LocalStorage", "local_storage_types": "LocalStorageTypes", "max": "Max", "memory_gi_b_per_v_cpu": "MemoryGiBPerVCpu", "memory_mi_b": "MemoryMiB", "min": "Min", "monitoring": "Monitoring", "name": "Name", "network_interface_count": "NetworkInterfaceCount", "network_interface_id": "NetworkInterfaceId", "network_interfaces": "NetworkInterfaces", "no_device": "NoDevice", "on_demand_allocation_strategy": "OnDemandAllocationStrategy", "on_demand_max_price_percentage_over_lowest_price": "OnDemandMaxPricePercentageOverLowestPrice", "on_demand_max_total_price": "OnDemandMaxTotalPrice", "on_demand_target_capacity": "OnDemandTargetCapacity", "overrides": "Overrides", "placement": "Placement", "primary": "Primary", "priority": "Priority", "private_ip_address": "PrivateIpAddress", "private_ip_addresses": "PrivateIpAddresses", "ramdisk_id": "RamdiskId", "replace_unhealthy_instances": "ReplaceUnhealthyInstances", "replacement_strategy": "ReplacementStrategy", "require_hibernate_support": "RequireHibernateSupport", "resource_type": "ResourceType", "secondary_private_ip_address_count": "SecondaryPrivateIpAddressCount", "security_groups": "SecurityGroups", "snapshot_id": "SnapshotId", "spot_fleet_request_config_data": "SpotFleetRequestConfigData", "spot_maintenance_strategies": "SpotMaintenanceStrategies", "spot_max_price_percentage_over_lowest_price": "SpotMaxPricePercentageOverLowestPrice", "spot_max_total_price": "SpotMaxTotalPrice", "spot_price": "SpotPrice", "subnet_id": "SubnetId", "tag_specifications": "TagSpecifications", "tags": "Tags", "target_capacity": "TargetCapacity", "target_capacity_unit_type": "TargetCapacityUnitType", "target_groups": "TargetGroups", "target_groups_config": "TargetGroupsConfig", "tenancy": "Tenancy", "terminate_instances_with_expiration": "TerminateInstancesWithExpiration", "termination_delay": "TerminationDelay", "total_local_storage_gb": "TotalLocalStorageGB", "type": "Type", "user_data": "UserData", "v_cpu_count": "VCpuCount", "valid_from": "ValidFrom", "valid_until": "ValidUntil", "value": "Value", "version": "Version", "virtual_name": "VirtualName", "volume_size": "VolumeSize", "volume_type": "VolumeType", "weighted_capacity": "WeightedCapacity", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }