terraform-provider-avi
terraform-provider-avi copied to clipboard
No working full examples for vsphere
Describe the bug
None of the existing examples for vsphere can possibly result in a successful deployment for several reasons:-
- They do not correctly specify that the old_password for an initial avi install is a hardcoded value available to current customers only
- They do not correctly use depends_on to ensure resources are created in the correct order
- The avi_useraccount call can never succeed immediately after a controller VM creation - you have to include a (for example) data.avi_systemconfiguration read first in order to ensure the controller on the VM is ready for initialisation
- The provided vm creation example does not have an ip address in use wait specified, again causing calls to fail
- No examples show initial configuration of an avi controller post creation
- No examples show configuring static ip, default gateway, or NTP information (they assume DHCP is used for the management network, but this is not explained anywhere, or documented)
- The default API version for avi terraform 21.1.4 seems to be API version 18.8 - meaning a basic systemconfiguration resource will fail due to common_criteria_mode being included (even with false) - no mention of api_version being used in the basic set up examples
Reproduction steps
1. Run the examples against a h2o.vmware.com demo environment
2. Observe the failure
3.
...
Expected behavior
There should be a working example that is non trivial in accordance with the VMware avi set up documentation. This should include all aspects including, but not limited to, deploy the controller ova to a content library, creating VMs, joining VMs to a cluster, providing initial system configuration (default gateway, ip, ntp, dns etc.), followed by configuring the CA to include the management IP address(es), setting up a management VIP, configuring the SE group and cloud for vSphere settings.
Additional context
Currently this is only possible, in a hacky way, through reverse engineering