Technical

What’s New in vSphere Automation: Infrastructure as Code

(This is the fifth of five blog posts on new automation features and enhancements in the latest VMware vSphere releases)

In this final post about automation in vSphere, we’ll discuss the emerging field of providers for HashiCorp Terraform. Terraform, the world’s leading multi-cloud provisioning tool, serves as a unified control plane. It uses infrastructure as code to automate infrastructure provisioning and management. Let’s delve into these three specific providers:

Both the VMware Cloud and VMware Cloud Foundation providers receive full support from VMware. Support for the vSphere Terraform provider is a collaborative effort between VMware and HashiCorp to ensure the best possible experience for users.

Challenges

Due to the intricate nature of managing and operating VMware customer environments, many users choose to automate with HashiCorp Terraform. Their decision is driven by the tool’s inherent features and its key capabilities, which are:

  • Public cloud provisioning: Terraform provides providers that encapsulate public APIs, allowing users to create declarative syntax for provisioning resources in public clouds.
  • Managing Multi-Cloud deployments: Terraform facilitates the management of deployments across multiple cloud platforms.
  • Infrastructure as Code (IaC): Terraform enables Infrastructure as Code, allowing users to define and manage their infrastructure using code.

At VMware, it is crucial for us to address the following aspects for our users:

  • Well-established providers: We must ensure that our Terraform providers have a solid foundation and are reliable for our users.
  • Strong provider support: We must offer comprehensive support for our providers and promptly address any user issues that may arise.
  • Integration of new features: We must actively integrate new features into our providers, ensuring that users can leverage the latest capabilities in their automation workflows.

Significant improvements can be made here, resolving issues reported by customers and exposing new VMware product functions to Terraform for configuration, while doing it quickly and ensuring quality as well. This can be done through the implementation of an automation pipeline, conducting automated tests for every community commit. Adequate test coverage must be ensured to safeguard existing and functional features from being affected by future changes.

Improving Terraform Providers

VMware Cloud

Since mid-2022, we’ve invested considerable effort into revamping and refining the provider. This commitment is evident in the many new releases and hotfixes we’ve rolled out, beginning with the 1.9.2 release in June 2022. I’d like to spotlight several key features we’ve introduced in recent updates:

  • Version 1.11.0 – Cluster operations: Users can now initiate Create/Update/Destroy operations on multiple clusters simultaneously, eliminating the need for depends_on=[]
  • Version 1.12.0 – SDDC group support: We have added support for managing SDDC groups, allowing users to effectively organize and manage their SDDC resources.
  • Version 1.13.0 – OAuth2.0 app authentication: We have introduced support for OAuth2.0 app authentication, enabling users to authenticate and interact with VMware resources securely.

As a result of this work the provider is in excellent condition, with only four open issues and 62 issues already resolved. This reflects our commitment to continually improve the provider’s functionality and address user concerns.

VMware vSphere

Over the last 18 months, we’ve forged a robust partnership with HashiCorp to manage and support the vSphere Terraform provider. In the recent release versions, VMware has been the primary contributor, driving most of the content rolled out. Here are some significant improvements from the last two releases:

v2.3.0 – Released in February 2023:

  • Added support for the paravirtual RDMA (PVRDMA) vmxnet3vrdma network interface adapter type.
  • Introduced an optional extra_config_reboot_required argument to r/virtual_machine.
  • Enabled support for attaching two (2) CD-ROMs to a virtual machine.
  • Added support for vSAN compression and deduplication.
  • Implemented support for vSAN performance services.
  • Enabled support for vSAN unmap.
  • Introduced support for vSAN HCI Mesh.
  • Added support for vSAN Data-in-Transit Encryption.
  • Implemented support for import operations.

v2.4.0 – Released in May 2023:

  • Introduced support for lookup by moid.
  • Enabled services for vmkernel adapter/vnic.

In summary, we’ve addressed roughly 1100 issues. We consistently prioritize new issues, aiming to minimize the number of unresolved matters. This underscores our dedication to improving the Terraform provider’s stability and functionality in line with our users’ expectations.

What’s Next?

Moving forward, our strategy centers on maintaining and enhancing all three Terraform providers, while deepening our collaboration with HashiCorp. To guarantee their sustained success, our focus will encompass the following initiatives:

  • Addressing Community Concerns Promptly: We’ll give precedence to and resolve issues highlighted by the community, based on their urgency and importance.
  • Integrating New VMware Cloud and vSphere Features: Our aim is to seamlessly integrate the latest features and functionalities of VMware Cloud and vSphere into the Terraform providers.
  • Strengthening Automation Tests: We’re committed to refining the automation tests for our providers. This ensures immediate feedback for every community contribution, enhancing the overall quality.
  • Boosting Popularity and Broadening Contributor Base: We’re set on elevating the Terraform providers’ prominence and actively inviting a wider range of contributors to partake in their evolution.

Furthermore, an important goal on our horizon is the launch of a new VMware Cloud Foundation Terraform provider. With the recent debut of its initial release, v0.1.0, users can now access fundamental features like commissioning/decommissioning hosts, managing network pools, handling SSO users, and toggling telemetry (CEIP). While refining this provider remains a work in progress, users can anticipate frequent updates that bolster its capabilities and reliability.

Our unwavering commitment to the Terraform providers stems from recognizing their pivotal role for our users. Terraform stands out as a top choice for infrastructure automation and provisioning. As such, we pledge to consistently prioritize the evolution, support, and enhancement of our Terraform providers, ensuring our users enjoy an unparalleled experience managing their VMware environments.