Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a specific resource/data source to create, read, update and delete CSE Kubernetes clusters #1195

Merged
merged 160 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 157 commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
53d6bd7
Init
adambarreiro Jan 4, 2024
2411dd0
#
adambarreiro Jan 4, 2024
5108697
Refactor
adambarreiro Jan 8, 2024
e2a7ab7
Add delete
adambarreiro Jan 8, 2024
b4db508
#
adambarreiro Jan 9, 2024
8b3413d
#
adambarreiro Jan 10, 2024
a0ab3eb
Refactor
adambarreiro Jan 10, 2024
26f78d4
Add test, doesnt run/pass
adambarreiro Jan 10, 2024
b098b63
Refactor node pools
adambarreiro Jan 11, 2024
94fb634
All templates and placeholders done
adambarreiro Jan 11, 2024
713677d
Fixes and cleanup
adambarreiro Jan 11, 2024
f4c1abf
Fix bugs, unmarshaling still does odd things with bools
adambarreiro Jan 12, 2024
7780af4
Fixes, cluster starts being created
adambarreiro Jan 15, 2024
6e9f46c
Refactor delete and add navigateMap func
adambarreiro Jan 15, 2024
9caa30e
Refactor delete and add navigateMap func
adambarreiro Jan 15, 2024
b24e80c
Fixes
adambarreiro Jan 15, 2024
e5a7213
Merge
adambarreiro Jan 16, 2024
652cccc
Modified creation to wait for clusters, Start update operation
adambarreiro Jan 16, 2024
f6cc5a9
Deprecate management guide and add changelog
adambarreiro Jan 16, 2024
f948624
Deprecate management guide and add changelog
adambarreiro Jan 16, 2024
70ab7e3
Created docs
adambarreiro Jan 16, 2024
58ee326
Created docs
adambarreiro Jan 16, 2024
6022cc1
self-review
adambarreiro Jan 16, 2024
1143783
Fixes
adambarreiro Jan 16, 2024
ca18ade
Refactor delete
adambarreiro Jan 16, 2024
5ac5114
Added latest_event attribute
adambarreiro Jan 16, 2024
cac4eaa
Added latest_event attribute
adambarreiro Jan 16, 2024
742a8ef
#
adambarreiro Jan 16, 2024
904f08c
Improve error handling
adambarreiro Jan 17, 2024
98683b4
Prepare unit tests
adambarreiro Jan 17, 2024
de9803f
Refactor
adambarreiro Jan 17, 2024
bb777a0
Refactor
adambarreiro Jan 17, 2024
7fa70bc
Refactor
adambarreiro Jan 17, 2024
fd71def
Refactor
adambarreiro Jan 17, 2024
b5000c4
Tests pass
adambarreiro Jan 18, 2024
56877a7
Half implementation of update
adambarreiro Jan 18, 2024
f9f9222
Cluster update impl, but not tested
adambarreiro Jan 19, 2024
2cc0e9c
Fixes in update, not tested
adambarreiro Jan 19, 2024
f43fb21
Refactor
adambarreiro Jan 19, 2024
9189d7f
Change local get files to remote get files, other improvements. Creat…
adambarreiro Jan 19, 2024
b043204
Change local get files to remote get files, other improvements. Creat…
adambarreiro Jan 19, 2024
748aab5
Fix missing ForceNews
adambarreiro Jan 19, 2024
14148ca
Fix few things
adambarreiro Jan 19, 2024
e4d01c5
Remove unused attr
adambarreiro Jan 19, 2024
677328d
Complete computed attributes
adambarreiro Jan 19, 2024
d3448ce
Complete computed attributes
adambarreiro Jan 19, 2024
77122f1
Complete computed attributes
adambarreiro Jan 19, 2024
766b990
Docs
adambarreiro Jan 19, 2024
5d33a69
Move Required to Optionals and create validator
adambarreiro Jan 19, 2024
413a58f
Move Required to Optionals and create validator
adambarreiro Jan 19, 2024
4a50b8d
Fixes in import
adambarreiro Jan 19, 2024
c6f397f
Start testing Update op
adambarreiro Jan 22, 2024
fe3b333
Fixes
adambarreiro Jan 23, 2024
c36ad68
Progress with read
adambarreiro Jan 24, 2024
3dec966
Progress with read/import
adambarreiro Jan 25, 2024
524ee2f
checkpoint
adambarreiro Jan 30, 2024
f24aeaf
Refactor with latest SDK changes
adambarreiro Feb 2, 2024
d071e50
Refactor with latest SDK changes
adambarreiro Feb 2, 2024
c5e5c80
Implement data source
adambarreiro Feb 2, 2024
c6fa385
Docs
adambarreiro Feb 2, 2024
46a4ae5
Fix cse_version field
adambarreiro Feb 12, 2024
abc3833
Fix cse_version field
adambarreiro Feb 12, 2024
50b20cc
Add 4.2.0
adambarreiro Feb 12, 2024
48c5569
#
adambarreiro Feb 12, 2024
3b4a62c
Add org traversal right
adambarreiro Feb 12, 2024
143c5a7
Add vcd_version data source
adambarreiro Feb 12, 2024
9c07d3e
Add vcd_version data source
adambarreiro Feb 12, 2024
bee31eb
Add vcd_version data source
adambarreiro Feb 12, 2024
88d9ea3
Add vcd_version data source
adambarreiro Feb 12, 2024
47cb8bb
Fix 4.1
adambarreiro Feb 12, 2024
c58aabf
Update guide
adambarreiro Feb 12, 2024
d754f07
Fix data source
adambarreiro Feb 12, 2024
e9536c9
Improvements
adambarreiro Feb 12, 2024
f981dc3
Add import clarifications
adambarreiro Feb 13, 2024
1706ed9
Add import clarifications
adambarreiro Feb 13, 2024
457021b
Fixes
adambarreiro Feb 13, 2024
a4ea880
Fixes
adambarreiro Feb 13, 2024
083076b
Fixes and finish Update
adambarreiro Feb 13, 2024
0817452
#
adambarreiro Feb 13, 2024
bbb8f4c
#
adambarreiro Feb 13, 2024
a3f2add
#
adambarreiro Feb 13, 2024
8b1d792
#
adambarreiro Feb 13, 2024
e76d9b9
Fixes
adambarreiro Feb 14, 2024
79f38cb
Improve feedback on provisioning/errored cluster
adambarreiro Feb 14, 2024
89f0bf9
goreplace
adambarreiro Feb 15, 2024
2de851e
sdk bump
adambarreiro Feb 16, 2024
1dd8baa
bump sdk
adambarreiro Feb 16, 2024
57a97e1
Change again to typeset but with hash func
adambarreiro Feb 19, 2024
82603a5
Fix
adambarreiro Feb 19, 2024
9d32381
Bump sdk
adambarreiro Feb 20, 2024
0ba3af8
Improve events
adambarreiro Feb 20, 2024
3879dce
Fix data source
adambarreiro Feb 20, 2024
3b845e9
Fix events order
adambarreiro Feb 20, 2024
21476e2
Fix docs
adambarreiro Feb 20, 2024
67d01cd
Fixes in import
adambarreiro Feb 20, 2024
5d9cc85
Test
adambarreiro Feb 20, 2024
7bdfb24
sdk bump
adambarreiro Feb 21, 2024
e255b52
fix docs
adambarreiro Feb 21, 2024
9b18cc9
fix docs
adambarreiro Feb 21, 2024
1e6e702
Fix upgrade
adambarreiro Feb 21, 2024
8286185
bump sdk
adambarreiro Feb 26, 2024
b52c20a
Bump sdk
adambarreiro Feb 28, 2024
a435b3e
Improve tests
adambarreiro Feb 28, 2024
fb085e6
Improve tests
adambarreiro Feb 28, 2024
924e279
Fix test
adambarreiro Feb 28, 2024
1def850
Fix test
adambarreiro Feb 28, 2024
1cd6274
Fix test
adambarreiro Feb 29, 2024
a62b5ee
Fix versions
adambarreiro Feb 29, 2024
d7ec5d3
Finish test, needs to pass
adambarreiro Feb 29, 2024
86b75bf
Finish test, needs to pass
adambarreiro Feb 29, 2024
423e4c5
Reverted test, needs to pass
adambarreiro Feb 29, 2024
3169b78
Fix test
adambarreiro Feb 29, 2024
671c900
Fix test
adambarreiro Mar 1, 2024
b6481de
Bump sdk
adambarreiro Mar 1, 2024
4df2b6e
Add import test
adambarreiro Mar 1, 2024
a1392ec
Add import test
adambarreiro Mar 1, 2024
23bc446
Fix test
adambarreiro Mar 4, 2024
dfe18bc
Improve test
adambarreiro Mar 4, 2024
1ef7727
Add new test, still need to pass
adambarreiro Mar 4, 2024
f8b959a
Self-review
adambarreiro Mar 4, 2024
81fac15
Self-review
adambarreiro Mar 4, 2024
edb3170
Self-review
adambarreiro Mar 4, 2024
d29da7a
Bump sdk
adambarreiro Mar 4, 2024
dd0bb5f
Fix test
adambarreiro Mar 4, 2024
f7187dd
Fix test
adambarreiro Mar 4, 2024
d03d564
fmt hcl
adambarreiro Mar 4, 2024
775ab29
fmt hcl
adambarreiro Mar 4, 2024
5c6092e
Fix test
adambarreiro Mar 5, 2024
adde707
Fix test
adambarreiro Mar 5, 2024
3812cb2
Fix test
adambarreiro Mar 5, 2024
01ecb50
Fix test
adambarreiro Mar 5, 2024
193bbf4
Add DS tests
adambarreiro Mar 5, 2024
8d4ac41
#
adambarreiro Mar 5, 2024
5b40e8d
Fix test
adambarreiro Mar 5, 2024
56106b8
fix docs
adambarreiro Mar 5, 2024
62a0738
Fix changelog
adambarreiro Mar 6, 2024
3f20c6d
Fix test
adambarreiro Mar 6, 2024
d97995b
Bump sdk
adambarreiro Mar 6, 2024
11ebded
Add CSE v4.2.1
adambarreiro Mar 6, 2024
9527702
Fix test, attempt
adambarreiro Mar 6, 2024
b9d1535
Fix test, attempt
adambarreiro Mar 6, 2024
cf1a5e8
Fix nil pointer
adambarreiro Mar 6, 2024
6df2fc4
Fix warning msg
adambarreiro Mar 6, 2024
e800b65
Fix test, attempt
adambarreiro Mar 6, 2024
129525c
Add more tests to vcd_version DS
adambarreiro Mar 6, 2024
0573030
Fix sample config
adambarreiro Mar 6, 2024
8401ce9
Fix sample config
adambarreiro Mar 6, 2024
0f2c86e
Fix test
adambarreiro Mar 7, 2024
8c837d3
Fix test
adambarreiro Mar 7, 2024
7043744
bump sdk
adambarreiro Mar 7, 2024
53d4530
nit
adambarreiro Mar 7, 2024
834850b
Fix test
adambarreiro Mar 7, 2024
19fc511
Merge
adambarreiro Mar 7, 2024
4fa6923
Apply suggestions
adambarreiro Mar 8, 2024
8904913
Apply suggestions
adambarreiro Mar 8, 2024
05bf78f
Add automatic import section
adambarreiro Mar 8, 2024
1c21f8a
Explicitly put 4.1.1a
adambarreiro Mar 8, 2024
f554b84
Bump SDK
adambarreiro Mar 8, 2024
1d6302f
Fix test
adambarreiro Mar 8, 2024
961763e
Merge
adambarreiro Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changes/v3.12.0/1195-deprecations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Resource `vcd_cse_kubernetes_cluster` deprecates the Container Service Extension cluster management guide,
so users should not use `vcd_rde` resources to create a Kubernetes cluster anymore [GH-1195]
5 changes: 5 additions & 0 deletions .changes/v3.12.0/1195-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* **New Resource:** `vcd_cse_kubernetes_cluster` to create and manage Kubernetes clusters in a VCD with Container Service Extension
4.2.1, 4.2.0, 4.1.1 or 4.1.0 installed and running [GH-1195]
* **New Data Source:** `vcd_cse_kubernetes_cluster` to read Kubernetes clusters from a VCD with Container Service Extension
4.2.1, 4.2.0, 4.1.1 or 4.1.0 installed and running [GH-1195]
* **New Data Source:** `vcd_version` to get the VCD version and perform additional checks with version constraints [GH-1195]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE 4.1 TKGm cluster creation:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_cluster_management
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_cluster_management
# before applying this configuration.
#
# * Please make sure to have CSE v4.1 installed in your VCD appliance and the CSE Server is correctly running.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ variable "k8s_cluster_name" {
description = "The name of the Kubernetes cluster. Name must contain only lowercase alphanumeric characters or '-' start with an alphabetic character, end with an alphanumeric, and contain at most 31 characters (Example: 'MyCluster')"
type = string
validation {
condition = can(regex("^[a-z][a-z0-9-]{0,29}[a-z0-9]$", var.k8s_cluster_name))
condition = can(regex("^[a-z](?:[a-z0-9-]{0,29}[a-z0-9])?$", var.k8s_cluster_name))
error_message = "Name must contain only lowercase alphanumeric characters or '-', start with an alphabetic character, end with an alphanumeric, and contain at most 31 characters."
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation, step 1:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * The installation process is split into two steps as the first one creates a CSE admin user that needs to be
Expand All @@ -11,12 +11,12 @@
# Other than that, this snippet should be applied as it is.
# ------------------------------------------------------------------------------------------------------------

# VCD Provider configuration. It must be at least v3.11.0 and configured with a System administrator account.
# VCD Provider configuration. It must be at least v3.12.0 and configured with a System administrator account.
terraform {
required_providers {
vcd = {
source = "vmware/vcd"
version = ">= 3.11"
version = ">= 3.12"
}
}
}
Expand All @@ -32,3 +32,15 @@ provider "vcd" {
logging = true
logging_file = "cse_install_step1.log"
}

# Minimum supported version for CSE
data "vcd_version" "cse_minimum_supported" {
condition = ">= 10.4.2"
fail_if_not_match = true
}

# There are some special rights and elements introduced in VCD 10.5.1
data "vcd_version" "gte_1051" {
condition = ">= 10.5.1"
fail_if_not_match = false
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation, step 1:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * The installation process is split into two steps as the first one creates a CSE admin user that needs to be
Expand Down Expand Up @@ -94,7 +94,7 @@ resource "vcd_role" "cse_admin_role" {
org = var.administrator_org
name = "CSE Admin Role"
description = "Used for administrative purposes"
rights = [
rights = concat([
"API Tokens: Manage",
"${vcd_rde_type.vcdkeconfig_type.vendor}:${vcd_rde_type.vcdkeconfig_type.nss}: Administrator Full access",
"${vcd_rde_type.vcdkeconfig_type.vendor}:${vcd_rde_type.vcdkeconfig_type.nss}: Administrator View",
Expand All @@ -106,7 +106,7 @@ resource "vcd_role" "cse_admin_role" {
"${vcd_rde_type.capvcdcluster_type.vendor}:${vcd_rde_type.capvcdcluster_type.nss}: Full Access",
"${vcd_rde_type.capvcdcluster_type.vendor}:${vcd_rde_type.capvcdcluster_type.nss}: Modify",
"${vcd_rde_type.capvcdcluster_type.vendor}:${vcd_rde_type.capvcdcluster_type.nss}: View"
]
], data.vcd_version.gte_1051.matches_condition ? ["Organization: Traversal"] : [])
}

# This will allow to have a user with a limited set of rights that can access the Provider area of VCD.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation, step 1:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * The installation process is split into two steps as the first one creates a CSE admin user that needs to be
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation, step 2:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * The installation process is split into two steps as the first one creates a CSE admin user that needs to be
Expand All @@ -11,12 +11,12 @@
# Other than that, this snippet should be applied as it is.
# ------------------------------------------------------------------------------------------------------------

# VCD Provider configuration. It must be at least v3.11.0 and configured with a System administrator account.
# VCD Provider configuration. It must be at least v3.12.0 and configured with a System administrator account.
terraform {
required_providers {
vcd = {
source = "vmware/vcd"
version = ">= 3.11"
version = ">= 3.12"
}
time = {
source = "hashicorp/time"
Expand All @@ -40,3 +40,9 @@ provider "vcd" {
logging = true
logging_file = "cse_install_step2.log"
}

# Minimum supported version for CSE
data "vcd_version" "cse_minimum_supported" {
condition = ">= 10.4.2"
fail_if_not_match = true
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * Rename "terraform.tfvars.example" to "terraform.tfvars" and adapt the values to your needs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * Rename "terraform.tfvars.example" to "terraform.tfvars" and adapt the values to your needs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * Rename "terraform.tfvars.example" to "terraform.tfvars" and adapt the values to your needs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------------------------------------
# CSE v4.1 installation:
#
# * Please read the guide present at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * Rename "terraform.tfvars.example" to "terraform.tfvars" and adapt the values to your needs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"profiles": [
{
"name": "production",
"active": true,
"serverConfig": {
"rdePollIntervalInMin": 1,
"heartbeatWatcherTimeoutInMin": 10,
"staleHeartbeatIntervalInMin": 30
},
"vcdKeInstances": [
{
"name": "vcd-container-service-extension"
}
],
"K8Config": {
"certificateAuthorities": [
${k8s_cluster_certificates}
],
"cni": {
"name": "antrea",
"version": ""
},
"cpi": {
"name": "cpi for cloud director",
"version": "${cpi_version}"
},
"csi": [
{
"name": "csi for cloud director",
"version": "${csi_version}"
}
],
"mhc": {
"maxUnhealthyNodes": ${max_unhealthy_node_percentage},
"nodeStartupTimeout": "${node_startup_timeout}",
"nodeNotReadyTimeout": "${node_not_ready_timeout}",
"nodeUnknownTimeout": "${node_unknown_timeout}"
},
"rdeProjectorVersion": "${rde_projector_version}"
},
"vcdConfig": {
"sysLogger": {
"host": "${syslog_host}",
"port": "${syslog_port}"
}
},
"githubConfig": {
"githubPersonalAccessToken": ""
},
"bootstrapClusterConfig": {
"capiEcosystem": {
"infraProvider": {
"name": "capvcd",
"version": "v${capvcd_version}",
"capvcdRde": {
"nss": "capvcdCluster",
"vendor": "vmware",
"version": "1.3.0"
}
},
"coreCapiVersion": "v1.4.0",
"bootstrapProvider": {
"name": "CAPBK",
"version": "v1.4.0"
},
"controlPlaneProvider": {
"name": "KCP",
"version": "v1.4.0"
},
"certManagerVersion": "v1.11.1"
},
"certificateAuthorities": [
${bootstrap_vm_certificates}
],
"clusterctl": {
"version": "v1.4.0",
"clusterctlyaml": ""
},
"dockerVersion": "",
"kindVersion": "v0.19.0",
"kindestNodeVersion": "v1.27.1",
"kubectlVersion": "",
"proxyConfig": {
"noProxy": "${no_proxy}",
"httpProxy": "${http_proxy}",
"httpsProxy": "${https_proxy}"
},
"sizingPolicy": "${bootstrap_vm_sizing_policy}"
},
"containerRegistryUrl": "${container_registry_url}"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ------------------------------------------------------------------------------------------------------------
# CSE 4.2 installation, step 1:
#
# * Please read the guide at https://registry.terraform.io/providers/vmware/vcd/latest/docs/guides/container_service_extension_4_x_install
# before applying this configuration.
#
# * The installation process is split into two steps as the first one creates a CSE admin user that needs to be
# used in a "provider" block in the second one.
#
# * Rename "terraform.tfvars.example" to "terraform.tfvars" and adapt the values to your needs.
# Other than that, this snippet should be applied as it is.
# ------------------------------------------------------------------------------------------------------------

# VCD Provider configuration. It must be at least v3.12.0 and configured with a System administrator account.
terraform {
required_providers {
vcd = {
source = "vmware/vcd"
version = ">= 3.12"
}
}
}

provider "vcd" {
url = "${var.vcd_url}/api"
user = var.administrator_user
password = var.administrator_password
auth_type = "integrated"
sysorg = var.administrator_org
org = var.administrator_org
allow_unverified_ssl = var.insecure_login
logging = true
logging_file = "cse_install_step1.log"
}

# Minimum supported version for CSE
data "vcd_version" "cse_minimum_supported" {
condition = ">= 10.4.2"
fail_if_not_match = true
}

# There are some special rights and elements introduced in VCD 10.5.1
data "vcd_version" "gte_1051" {
condition = ">= 10.5.1"
fail_if_not_match = false
}
Loading
Loading