Skip to content

Commit 2347262

Browse files
authored
Adjust vSphere tfvars and test definitions to use the correct template and folder (#3901)
* Backport vSphere terraform config from main Signed-off-by: Artiom Diomin <[email protected]> * Adjust vSphere tfvars and test definitions to use the correct template and folder Signed-off-by: Artiom Diomin <[email protected]> --------- Signed-off-by: Artiom Diomin <[email protected]>
1 parent 2b34c58 commit 2347262

File tree

7 files changed

+25
-22
lines changed

7 files changed

+25
-22
lines changed

examples/terraform/vsphere/README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ See the [Terraform loadbalancers in examples document][docs-tf-loadbalancer].
4444
| Name | Version |
4545
|------|---------|
4646
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
47-
| <a name="requirement_vsphere"></a> [vsphere](#requirement\_vsphere) | ~> 2.1.1 |
47+
| <a name="requirement_vsphere"></a> [vsphere](#requirement\_vsphere) | ~> 2.14.2 |
4848

4949
## Providers
5050

5151
| Name | Version |
5252
|------|---------|
5353
| <a name="provider_null"></a> [null](#provider\_null) | n/a |
5454
| <a name="provider_random"></a> [random](#provider\_random) | n/a |
55-
| <a name="provider_vsphere"></a> [vsphere](#provider\_vsphere) | ~> 2.1.1 |
55+
| <a name="provider_vsphere"></a> [vsphere](#provider\_vsphere) | ~> 2.14.2 |
5656

5757
## Modules
5858

@@ -64,14 +64,14 @@ No modules.
6464
|------|------|
6565
| [null_resource.keepalived_config](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
6666
| [random_string.keepalived_auth_pass](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
67-
| [vsphere_compute_cluster_vm_anti_affinity_rule.vm_anti_affinity_rule](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/compute_cluster_vm_anti_affinity_rule) | resource |
68-
| [vsphere_virtual_machine.control_plane](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine) | resource |
69-
| [vsphere_compute_cluster.cluster](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/compute_cluster) | data source |
70-
| [vsphere_datacenter.dc](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/datacenter) | data source |
71-
| [vsphere_datastore.datastore](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/datastore) | data source |
72-
| [vsphere_network.network](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/network) | data source |
73-
| [vsphere_resource_pool.pool](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/resource_pool) | data source |
74-
| [vsphere_virtual_machine.template](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/data-sources/virtual_machine) | data source |
67+
| [vsphere_compute_cluster_vm_anti_affinity_rule.vm_anti_affinity_rule](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/resources/compute_cluster_vm_anti_affinity_rule) | resource |
68+
| [vsphere_virtual_machine.control_plane](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/resources/virtual_machine) | resource |
69+
| [vsphere_compute_cluster.cluster](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/compute_cluster) | data source |
70+
| [vsphere_datacenter.dc](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/datacenter) | data source |
71+
| [vsphere_datastore.datastore](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/datastore) | data source |
72+
| [vsphere_network.network](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/network) | data source |
73+
| [vsphere_resource_pool.pool](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/resource_pool) | data source |
74+
| [vsphere_virtual_machine.template](https://registry.terraform.io/providers/vmware/vsphere/latest/docs/data-sources/virtual_machine) | data source |
7575

7676
## Inputs
7777

@@ -95,6 +95,7 @@ No modules.
9595
| <a name="input_datastore_name"></a> [datastore\_name](#input\_datastore\_name) | datastore name | `string` | `"datastore1"` | no |
9696
| <a name="input_dc_name"></a> [dc\_name](#input\_dc\_name) | datacenter name | `string` | `"dc-1"` | no |
9797
| <a name="input_disk_size"></a> [disk\_size](#input\_disk\_size) | disk size | `number` | `50` | no |
98+
| <a name="input_enable_disk_uuid"></a> [enable\_disk\_uuid](#input\_enable\_disk\_uuid) | Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest | `bool` | `true` | no |
9899
| <a name="input_folder_name"></a> [folder\_name](#input\_folder\_name) | folder name | `string` | `"kubeone"` | no |
99100
| <a name="input_initial_machinedeployment_operating_system_profile"></a> [initial\_machinedeployment\_operating\_system\_profile](#input\_initial\_machinedeployment\_operating\_system\_profile) | Name of operating system profile for MachineDeployments, only applicable if operating-system-manager addon is enabled.<br>If not specified, the default value will be added by machine-controller addon. | `string` | `""` | no |
100101
| <a name="input_initial_machinedeployment_replicas"></a> [initial\_machinedeployment\_replicas](#input\_initial\_machinedeployment\_replicas) | Number of replicas per MachineDeployment | `number` | `2` | no |

examples/terraform/vsphere/main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ resource "vsphere_virtual_machine" "control_plane" {
9292
template_uuid = data.vsphere_virtual_machine.template.id
9393
}
9494

95-
extra_config = {
96-
"disk.enableUUID" = "TRUE"
97-
}
95+
enable_disk_uuid = var.enable_disk_uuid
9896

9997
vapp {
10098
properties = {

examples/terraform/vsphere/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,9 @@ variable "ip_family" {
263263
error_message = "Unsupported IP Family specified."
264264
}
265265
}
266+
267+
variable "enable_disk_uuid" {
268+
default = true
269+
type = bool
270+
description = "Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest"
271+
}

examples/terraform/vsphere/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ terraform {
1818
required_version = ">= 1.0.0"
1919
required_providers {
2020
vsphere = {
21-
source = "hashicorp/vsphere"
22-
version = "~> 2.1.1"
21+
source = "vmware/vsphere"
22+
version = "~> 2.14.2"
2323
}
2424
}
2525
}

test/e2e/testdata/vsphere.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ datastore_name = "Datastore0-truenas"
44
compute_cluster_name = "vSAN Cluster"
55
network_name = "VM Network"
66
folder_name = "KubeOne-E2E"
7-
template_name = "kkp-ubuntu-24.04"
7+
template_name = "kubeone-e2e-ubuntu-24.04"
88
control_plane_memory = 4096
99
worker_memory = 4096
1010
disk_size = 25

test/e2e/tests_definitions.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,6 @@ var (
908908
path: "../../examples/terraform/vsphere",
909909
varFile: "testdata/vsphere.tfvars",
910910
vars: []string{
911-
"template_name=kubeone-ubuntu-24.04",
912911
"worker_os=ubuntu",
913912
"ssh_username=ubuntu",
914913
},
@@ -933,7 +932,6 @@ var (
933932
path: "../../../kubeone-stable/examples/terraform/vsphere",
934933
varFile: "testdata/vsphere.tfvars",
935934
vars: []string{
936-
"template_name=kubeone-ubuntu-24.04",
937935
"worker_os=ubuntu",
938936
"ssh_username=ubuntu",
939937
},

test/go-test-e2e.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ cloudConfig: |
158158
[Workspace]
159159
server = "${VSPHERE_SERVER}"
160160
datacenter = "Hamburg"
161-
default-datastore="vsan"
161+
default-datastore="Datastore0-truenas"
162162
resourcepool-path=""
163-
folder = "Kubermatic-ci"
163+
folder = "KubeOne-E2E"
164164
165165
[Disk]
166166
scsicontrollertype = pvscsi
@@ -180,9 +180,9 @@ csiConfig: |
180180
[Workspace]
181181
server = "${VSPHERE_SERVER}"
182182
datacenter = "Hamburg"
183-
default-datastore="vsan"
183+
default-datastore="Datastore0-truenas"
184184
resourcepool-path=""
185-
folder = "Kubermatic-ci"
185+
folder = "KubeOne-E2E"
186186
EOL
187187
;;
188188
*)

0 commit comments

Comments
 (0)