This commit is contained in:
2025-05-21 16:38:25 +03:00
parent 2c70109d2d
commit 9e68edb2b9
1034 changed files with 73925 additions and 3187 deletions

View File

@@ -391,7 +391,7 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"present_to": {
Type: schema.TypeList,
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -466,6 +466,10 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"size_available": {
Type: schema.TypeFloat,
Computed: true,
},
"size_max": {
Type: schema.TypeInt,
Computed: true,
@@ -789,7 +793,7 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
},
},
"pinned": {
Type: schema.TypeBool,
Type: schema.TypeInt,
Computed: true,
},
"preferred_cpu": {
@@ -918,10 +922,88 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"vgpus": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
Type: schema.TypeList,
Computed: true,
Description: "List of virtual GPUs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeInt,
Computed: true,
},
"gid": {
Type: schema.TypeInt,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"mode": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
},
"profile_id": {
Type: schema.TypeInt,
Computed: true,
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
"last_update_time": {
Type: schema.TypeInt,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
},
"vmid": {
Type: schema.TypeInt,
Computed: true,
},
"pgpuid": {
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
Type: schema.TypeString,
Computed: true,
},
"account_id": {
Type: schema.TypeInt,
Computed: true,
},
"rg_id": {
Type: schema.TypeInt,
Computed: true,
},
"last_claimed_by": {
Type: schema.TypeInt,
Computed: true,
},
"pci_slot": {
Type: schema.TypeInt,
Computed: true,
},
"bus_number": {
Type: schema.TypeInt,
Computed: true,
},
"guid": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
"virtual_image_id": {
@@ -949,6 +1031,22 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"loader_type": {
Type: schema.TypeString,
Computed: true,
},
"boot_type": {
Type: schema.TypeString,
Computed: true,
},
"hot_resize": {
Type: schema.TypeBool,
Computed: true,
},
"network_interface_naming": {
Type: schema.TypeString,
Computed: true,
},
}
return res
}
@@ -985,6 +1083,11 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
Optional: true,
Description: "Find by tech status",
},
"stack_name": {
Type: schema.TypeString,
Optional: true,
Description: "Find by node name.",
},
"status": {
Type: schema.TypeString,
Optional: true,
@@ -1462,6 +1565,10 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"nid": {
Type: schema.TypeInt,
Computed: true,
},
"numa_affinity": {
Type: schema.TypeString,
Computed: true,
@@ -1495,7 +1602,7 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
},
},
"pinned": {
Type: schema.TypeBool,
Type: schema.TypeInt,
Computed: true,
},
"preferred_cpu": {
@@ -1567,6 +1674,11 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"stack_name": {
Type: schema.TypeString,
Computed: true,
Description: "Find by node name.",
},
"stateless_sep_id": {
Type: schema.TypeInt,
Computed: true,
@@ -1634,6 +1746,22 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"loader_type": {
Type: schema.TypeString,
Computed: true,
},
"boot_type": {
Type: schema.TypeString,
Computed: true,
},
"hot_resize": {
Type: schema.TypeBool,
Computed: true,
},
"network_interface_naming": {
Type: schema.TypeString,
Computed: true,
},
},
},
},
@@ -1848,6 +1976,10 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"chipset": {
Type: schema.TypeString,
Computed: true,
},
"cd_image_id": {
Type: schema.TypeInt,
Computed: true,
@@ -1948,6 +2080,10 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"bus_number": {
Type: schema.TypeInt,
Computed: true,
},
"conn_id": {
Type: schema.TypeInt,
Computed: true,
@@ -1984,6 +2120,10 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"mtu": {
Type: schema.TypeInt,
Computed: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
@@ -2032,6 +2172,42 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
},
},
},
"libvirt_settings": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"guid": {
Type: schema.TypeString,
Computed: true,
},
"txmode": {
Type: schema.TypeString,
Computed: true,
},
"ioeventfd": {
Type: schema.TypeString,
Computed: true,
},
"event_idx": {
Type: schema.TypeString,
Computed: true,
},
"queues": {
Type: schema.TypeInt,
Computed: true,
},
"rx_queue_size": {
Type: schema.TypeInt,
Computed: true,
},
"tx_queue_size": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
"target": {
Type: schema.TypeString,
Computed: true,
@@ -2111,10 +2287,6 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
},
},
"pinned": {
Type: schema.TypeBool,
Computed: true,
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
@@ -2125,6 +2297,10 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
},
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
Type: schema.TypeString,
Computed: true,
@@ -2183,6 +2359,11 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"stack_name": {
Type: schema.TypeString,
Computed: true,
Description: "Find by node name.",
},
"stateless_sep_id": {
Type: schema.TypeInt,
Computed: true,
@@ -2250,6 +2431,22 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"loader_type": {
Type: schema.TypeString,
Computed: true,
},
"boot_type": {
Type: schema.TypeString,
Computed: true,
},
"hot_resize": {
Type: schema.TypeBool,
Computed: true,
},
"network_interface_naming": {
Type: schema.TypeString,
Computed: true,
},
},
},
},
@@ -3001,12 +3198,6 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Optional text description of this compute instance.",
},
"depresent": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Description: "whether to depresent compute disks from node or not",
},
"started": {
Type: schema.TypeBool,
Optional: true,
@@ -3044,7 +3235,6 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeSet,
Optional: true,
MinItems: 1,
MaxItems: constants.MAX_NETWORKS_PER_COMPUTE,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"net_type": {
@@ -3067,9 +3257,11 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Description: "Optional IP address to assign to this connection. This IP should belong to the selected network and free for use.",
},
"mac": {
Type: schema.TypeString,
Computed: true,
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
Type: schema.TypeString,
Optional: true,
Computed: true,
DiffSuppressFunc: networkSubresIPAddreDiffSupperss,
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
},
"weight": {
Type: schema.TypeInt,
@@ -3288,6 +3480,13 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Disk ID",
},
"present_to": {
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"shareable": {
Type: schema.TypeBool,
Computed: true,
@@ -3306,7 +3505,6 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
"extra_disks": {
Type: schema.TypeSet,
Optional: true,
MaxItems: constants.MAX_EXTRA_DISKS_PER_COMPUTE,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
@@ -3507,6 +3705,33 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
},
Description: "ID of the connected pci devices",
},
"loader_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, false),
Description: "Type of image vm.",
},
"boot_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"bios", "uefi"}, false),
Description: "Type of image upload.",
},
"hot_resize": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Description: "Type of image vm.",
},
"network_interface_naming": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"eth", "ens"}, false),
Description: "Name of netfowrk interface.",
},
// Computed properties
"account_id": {
Type: schema.TypeInt,
@@ -3858,7 +4083,7 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Description: "Guest OS users provisioned on this compute instance.",
},
"pinned": {
Type: schema.TypeBool,
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
@@ -3950,10 +4175,88 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"vgpus": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
Type: schema.TypeList,
Computed: true,
Description: "List of virtual GPUs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeInt,
Computed: true,
},
"gid": {
Type: schema.TypeInt,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"mode": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
},
"profile_id": {
Type: schema.TypeInt,
Computed: true,
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
"last_update_time": {
Type: schema.TypeInt,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
},
"vmid": {
Type: schema.TypeInt,
Computed: true,
},
"pgpuid": {
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
Type: schema.TypeString,
Computed: true,
},
"account_id": {
Type: schema.TypeInt,
Computed: true,
},
"rg_id": {
Type: schema.TypeInt,
Computed: true,
},
"last_claimed_by": {
Type: schema.TypeInt,
Computed: true,
},
"pci_slot": {
Type: schema.TypeInt,
Computed: true,
},
"bus_number": {
Type: schema.TypeInt,
Computed: true,
},
"guid": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
"virtual_image_id": {