Terraform VMware Cloud Director (VCD) Provider v3.14.0 is now available and supports VCD versions from 10.4.0 to 10.6.0. This release brings features and improvements actively requested by users. Contains 5 new sources and 7 new data sources, 11 improvements and 9 bug fixes.
API filters and external endpoints
API Filters allow you to extend the VCD API with customized URLs that can be redirected to an external endpoint. These two concepts now have their respective resources in the Terraform provider:
Here is an example that shows how to use them:
source “vcd_external_endpoint” “ep1” {
vendor=”broadcom”
name = “my endpoint”
version = “1.0.0”
enabled = true
description = “Example of a simple external endpoint”
root_url = “https://10.1.1.1/my-service”
}
source “vcd_api_filter” “af” {
external_endpoint_id = vcd_external_endpoint.ep1.id
url_matcher_pattern = “/my-service/.*”
url_matcher_scope = “EXT_API”
}
When this configuration is used, all requests that are on <vcd-url>/ext-api/my-service/...
will be redirected to https://10.1.1.1/my-service
with all request content and query parameters coming from the VCD.
ALB Virtual Services Policy
Three new sources and data sources for managing ALB virtual services HTTP policies. These resources can be quite large due to the amount of criteria to match and configure actions, but examples can be found on each of their own documentation pages:
An improvement
Improved user experience with RDE Behaviors
The sources and data sources vcd_rde_interface_behavior and vcd_rde_type_behavior had execution
argument that only supported key-value mappings to define behavior execution. This version adds a new argument, execution_json
which allows defining more complex behavior implementations by providing a complex JSON string specifying:
resource “vcd_rde_interface_behavior” “behavior” {
rde_interface_id = vcd_rde_interface.my_interface.id
name = “My Behavior”
# ‘execution_json’ allows you to use complex structures that are not possible with regular
# map ‘execution’, as nested_execution_properties in webhook behavior:
execute_json = jsonencode({
“type”: “WebHook”,
“id”: “testWebHook”,
“href”: “https://hooks.slack.com:443/services/T07UZFN0N/B01EW5NC42D/rfjhHCGIwzuzQFrpPZiuLkIX”,
“_internal_key”: “secretKey”,
“execution_properties”: {
“template”: {
“content”: “<řetězec_obsahu_šablony>“
},
“_secure_token”: “secureToken”,
“invocation_timeout”: 7
}
})
}
Note that the argument execution
can still be used for simpler definitions. Also, vcd_rde_behavior_invocation
the data source also allows you to use JSON arguments:
data “vcd_rde_behavior_invocation” “invoke” {
rde_id = vcd_rde.rde.id
behavior_id = vcd_rde_interface_behavior.behavior.id
invoke_on_refresh = true
json_arguments = jsonencode({
“template”: {
“happy”: “hello world”
},
“_secure_token”: “secureToken”,
“invocation_timeout”: 7
})
}
A new data source for catalog access control
With the new vcd_catalog_access_control datasource, the catalog access control and any information it provides in its attributes (such as the organizations the catalog is shared with) can be read.
Other notable improvements
Fixed bugs
Not everything is listed here, but there is a list of user-requested bug fixes that have been resolved and can be checked in the changelog.
Go SDK v2.26.0 released
Last but not least, there is the new version v2.26.0 Go SDK for VMware Cloud Director.