Documentation ¶
Index ¶
- Variables
- func DataSources(nameRegexp string, includeDeprecated bool) (map[string]*schema.Resource, error)
- func GetVcenterHref(vcdClient *govcd.VCDClient, name string) (string, error)
- func IsFloatAndBetween(min, max float64) schema.SchemaValidateFunc
- func IsIntAndAtLeast(min int) schema.SchemaValidateFunc
- func ObjectMap[Input any, Output any](input []Input, f func(Input) Output) []Output
- func Provider() *schema.Provider
- func ProviderAuthenticate(client *govcd.VCDClient, ...) error
- func Resources(nameRegexp string, includeDeprecated bool) (map[string]*schema.Resource, error)
- type Config
- type IgnoredMetadata
- type StringMap
- type TaskIdCollection
- type VCDClient
- func (cli *VCDClient) GetAdminOrg(orgName string) (org *govcd.AdminOrg, err error)
- func (cli *VCDClient) GetAdminOrgFromResource(d *schema.ResourceData) (org *govcd.AdminOrg, err error)
- func (cli *VCDClient) GetEdgeGateway(orgName, vdcName, edgeGwName string) (eg *govcd.EdgeGateway, err error)
- func (cli *VCDClient) GetEdgeGatewayFromResource(d *schema.ResourceData, edgeGatewayFieldName string) (eg *govcd.EdgeGateway, err error)
- func (cli *VCDClient) GetNsxtEdgeGateway(orgName, vdcName, edgeGwName string) (eg *govcd.NsxtEdgeGateway, err error)
- func (cli *VCDClient) GetNsxtEdgeGatewayById(orgName, edgeGwId string) (eg *govcd.NsxtEdgeGateway, err error)
- func (cli *VCDClient) GetNsxtEdgeGatewayFromResourceById(d *schema.ResourceData, edgeGatewayFieldName string) (eg *govcd.NsxtEdgeGateway, err error)
- func (cli *VCDClient) GetOrg(orgName string) (org *govcd.Org, err error)
- func (cli *VCDClient) GetOrgAndVdc(orgName, vdcName string) (org *govcd.Org, vdc *govcd.Vdc, err error)
- func (cli *VCDClient) GetOrgAndVdcFromResource(d *schema.ResourceData) (org *govcd.Org, vdc *govcd.Vdc, err error)
- func (cli *VCDClient) GetOrgFromResource(d *schema.ResourceData) (org *govcd.Org, err error)
- func (cli *VCDClient) GetOrgName(orgName string) (string, error)
- func (cli *VCDClient) GetOrgNameFromResource(d *schema.ResourceData) (string, error)
Constants ¶
This section is empty.
Variables ¶
var BuildVersion = "unset"
BuildVersion holds version which is meant to be injected at build time using ldflags (e.g. 'go build -ldflags="-X 'github.com/vmware/terraform-provider-vcd/v3/vcd.BuildVersion=v1.0.0'"')
var DFWElements = []string{
types.DFWElementIpv4,
types.DFWElementNetwork,
types.DFWElementEdge,
types.DFWElementIpSet,
types.DFWElementVirtualMachine,
types.DFWElementVdc,
}
var ( // IgnoreMetadataChangesConflictActions can hold values "error", "warn" or "none", and tells Terraform whether it should // give an error or just a warning if any Metadata Entry configured in HCL is affected by the 'ignore_metadata_changes' // configuration. IgnoreMetadataChangesConflictActions map[string]string )
var ( // ImportSeparator is the separation string used for import operations // Can be changed using either "import_separator" property in Provider // or environment variable "VCD_IMPORT_SEPARATOR" ImportSeparator = "." )
Functions ¶
func DataSources ¶
DataSources is a public function which allows filtering and access all defined data sources When 'nameRegexp' is not empty - it will return only those matching the regexp When 'includeDeprecated' is false - it will skip out the resources which have a DeprecationMessage set
func IsFloatAndBetween ¶
func IsFloatAndBetween(min, max float64) schema.SchemaValidateFunc
IsFloatAndBetween returns a SchemaValidateFunc which tests if the provided value convertable to float64 and is between min and max (inclusive).
func IsIntAndAtLeast ¶
func IsIntAndAtLeast(min int) schema.SchemaValidateFunc
IsIntAndAtLeast returns a SchemaValidateFunc which tests if the provided value string is convertable to int and is at least min (inclusive)
func ObjectMap ¶ added in v3.10.0
ObjectMap extracts an array of wanted elements from an array of complex objects. The Input type is the complex object. The Output type could be a simple data type, such as a string or a number, but could also be a different object. The conversion is performed by the f function, which takes one complex input object and produces the wanted output. examples:
ids := ObjectMap[*types.VimObjectRef, string](extendedProviderVdc.VMWProviderVdc.ResourcePoolRefs.VimObjectRef, vimObjectRefToMoref) ids := ObjectMap[*types.Reference, string](extendedProviderVdc.VMWProviderVdc.StorageProfiles.ProviderVdcStorageProfile, referenceToId) names := ObjectMap[*types.Reference, string](extendedProviderVdc.VMWProviderVdc.StorageProfiles.ProviderVdcStorageProfile, referenceToName)
func ProviderAuthenticate ¶
func ProviderAuthenticate(client *govcd.VCDClient, user, password, token, org, apiToken, apiTokenFile, saTokenFile string) error
TODO Look into refactoring this into a method of *Config
Types ¶
type Config ¶
type Config struct { User string Password string Token string // Token used instead of user and password ApiToken string // User generated token used instead of user and password ApiTokenFile string // File containing a user generated API token AllowApiTokenFile bool // Setting to suppress API Token File security warnings ServiceAccountTokenFile string // File containing the Service Account API token AllowSATokenFile bool // Setting to suppress Service Account Token File security warnings SysOrg string // Org used for authentication Org string // Default Org used for API operations Vdc string // Default (optional) VDC for API operations Href string MaxRetryTimeout int InsecureFlag bool // UseSamlAdfs specifies if SAML auth is used for authenticating VCD instead of local login. // The following conditions must be met so that authentication SAML authentication works: // * SAML IdP (Identity Provider) is Active Directory Federation Service (ADFS) // * Authentication endpoint "/adfs/services/trust/13/usernamemixed" must be enabled on ADFS // server UseSamlAdfs bool // CustomAdfsRptId allows to set custom Relaying Party Trust identifier. By default VCD Entity // ID is used as Relaying Party Trust identifier. CustomAdfsRptId string // CustomAdfsCookie // Placeholder {{.Org}} (if specified) will be replaced with real org // E.g "sso-preferred=yes; sso_redirect_org={{.Org}}" CustomAdfsCookie string // IgnoredMetadata allows to configure a set of metadata entries that should be ignored by all the // API operations related to metadata. IgnoredMetadata []govcd.IgnoredMetadata }
type IgnoredMetadata ¶ added in v3.10.0
type IgnoredMetadata struct { IgnoredMetadata govcd.IgnoredMetadata ConflictAction string }
IgnoredMetadata extends the SDK IgnoredMetadata type to be able to add also the conflict behavior defined as an attribute in the schema.
type StringMap ¶
type StringMap map[string]interface{}
StringMap type is used to simplify reading resource definitions
type TaskIdCollection ¶ added in v3.8.0
type VCDClient ¶
type VCDClient struct { *govcd.VCDClient SysOrg string Org string // name of default Org Vdc string // name of default VDC MaxRetryTimeout int InsecureFlag bool }
func (*VCDClient) GetAdminOrg ¶
GetAdminOrg finds org using the names provided in the args. If the name is empty, it will use the default org name from the provider.
func (*VCDClient) GetAdminOrgFromResource ¶
func (cli *VCDClient) GetAdminOrgFromResource(d *schema.ResourceData) (org *govcd.AdminOrg, err error)
GetAdminOrgFromResource is the same as GetOrgAndVdc, but using data from the resource, if available.
func (*VCDClient) GetEdgeGateway ¶
func (cli *VCDClient) GetEdgeGateway(orgName, vdcName, edgeGwName string) (eg *govcd.EdgeGateway, err error)
GetEdgeGateway gets an NSX-V Edge Gateway when you don't need org or vdc for other purposes
func (*VCDClient) GetEdgeGatewayFromResource ¶
func (cli *VCDClient) GetEdgeGatewayFromResource(d *schema.ResourceData, edgeGatewayFieldName string) (eg *govcd.EdgeGateway, err error)
GetEdgeGatewayFromResource is the same as GetEdgeGateway, but using data from the resource, if available edgeGatewayFieldName is the name used in the resource. It is usually "edge_gateway" for all resources that *use* an edge gateway, and when the resource is vcd_edgegateway, it is "name"
func (*VCDClient) GetNsxtEdgeGateway ¶ added in v3.3.0
func (cli *VCDClient) GetNsxtEdgeGateway(orgName, vdcName, edgeGwName string) (eg *govcd.NsxtEdgeGateway, err error)
GetNsxtEdgeGateway gets an NSX-T Edge Gateway when you don't need Org or VDC for other purposes
func (*VCDClient) GetNsxtEdgeGatewayById ¶ added in v3.3.0
func (cli *VCDClient) GetNsxtEdgeGatewayById(orgName, edgeGwId string) (eg *govcd.NsxtEdgeGateway, err error)
GetNsxtEdgeGatewayById gets an NSX-T Edge Gateway when you don't need Org or VDC for other purposes
func (*VCDClient) GetNsxtEdgeGatewayFromResourceById ¶ added in v3.3.0
func (cli *VCDClient) GetNsxtEdgeGatewayFromResourceById(d *schema.ResourceData, edgeGatewayFieldName string) (eg *govcd.NsxtEdgeGateway, err error)
GetNsxtEdgeGatewayFromResourceById helps to retrieve NSX-T Edge Gateway when Org org VDC are not needed. It performs a query By ID.
func (*VCDClient) GetOrg ¶ added in v3.3.0
GetOrg finds org using the names provided in the args. If the name is empty, it will use the default org name from the provider.
func (*VCDClient) GetOrgAndVdc ¶
func (cli *VCDClient) GetOrgAndVdc(orgName, vdcName string) (org *govcd.Org, vdc *govcd.Vdc, err error)
GetOrgAndVdc finds a pair of org and vdc using the names provided in the args. If the names are empty, it will use the default org and vdc names from the provider.
func (*VCDClient) GetOrgAndVdcFromResource ¶
func (cli *VCDClient) GetOrgAndVdcFromResource(d *schema.ResourceData) (org *govcd.Org, vdc *govcd.Vdc, err error)
GetOrgAndVdcFromResource is the same as GetOrgAndVdc, but using data from the resource, if available.
func (*VCDClient) GetOrgFromResource ¶ added in v3.3.0
GetOrgFromResource is the same as GetOrg, but using data from the resource, if available.
func (*VCDClient) GetOrgName ¶ added in v3.7.0
GetOrgName returns the parameter orgName if provided. If not tried to get it from provider.
func (*VCDClient) GetOrgNameFromResource ¶ added in v3.7.0
func (cli *VCDClient) GetOrgNameFromResource(d *schema.ResourceData) (string, error)
GetOrgNameFromResource returns the Org name if set at resource level. If not, tries to get it from provider level. It errors if none is provided.
Source Files ¶
- catalogitem.go
- config.go
- datasource_nsxt_tier0_router.go
- datasource_nsxt_tier0_router_interface.go
- datasource_vcd_api_filter.go
- datasource_vcd_catalog.go
- datasource_vcd_catalog_access_control.go
- datasource_vcd_catalog_item.go
- datasource_vcd_catalog_media.go
- datasource_vcd_catalog_vapp_template.go
- datasource_vcd_certificate_library.go
- datasource_vcd_cse_kubernetes_cluster.go
- datasource_vcd_dse_registry_configuration.go
- datasource_vcd_dse_solution_publish.go
- datasource_vcd_edgegateway.go
- datasource_vcd_external_endpoint.go
- datasource_vcd_external_network.go
- datasource_vcd_external_network_v2.go
- datasource_vcd_global_role.go
- datasource_vcd_independent_disk.go
- datasource_vcd_ip_space.go
- datasource_vcd_ip_space_custom_quota.go
- datasource_vcd_ip_space_ip_allocation.go
- datasource_vcd_ip_space_uplink.go
- datasource_vcd_ipset.go
- datasource_vcd_lb_app_profile.go
- datasource_vcd_lb_app_rule.go
- datasource_vcd_lb_server_pool.go
- datasource_vcd_lb_service_monitor.go
- datasource_vcd_lb_virtual_server.go
- datasource_vcd_multisite_org_association.go
- datasource_vcd_multisite_org_data.go
- datasource_vcd_multisite_site.go
- datasource_vcd_multisite_site_association.go
- datasource_vcd_multisite_site_data.go
- datasource_vcd_network_direct.go
- datasource_vcd_network_isolated.go
- datasource_vcd_network_isolated_v2.go
- datasource_vcd_network_pool.go
- datasource_vcd_network_routed.go
- datasource_vcd_network_routed_v2.go
- datasource_vcd_nsxt_alb_cloud.go
- datasource_vcd_nsxt_alb_controller.go
- datasource_vcd_nsxt_alb_edgegateway_service_engine_group.go
- datasource_vcd_nsxt_alb_importable_cloud.go
- datasource_vcd_nsxt_alb_pool.go
- datasource_vcd_nsxt_alb_service_engine_group.go
- datasource_vcd_nsxt_alb_settings.go
- datasource_vcd_nsxt_alb_virtual_service.go
- datasource_vcd_nsxt_alb_virtual_service_req_rules.go
- datasource_vcd_nsxt_alb_virtual_service_resp_rules.go
- datasource_vcd_nsxt_alb_virtual_service_sec_rules.go
- datasource_vcd_nsxt_app_port_profile.go
- datasource_vcd_nsxt_distributed_firewall.go
- datasource_vcd_nsxt_distributed_firewall_rule.go
- datasource_vcd_nsxt_dynamic_security_group.go
- datasource_vcd_nsxt_edge_cluster.go
- datasource_vcd_nsxt_edgegateway.go
- datasource_vcd_nsxt_edgegateway_bgp_configuration.go
- datasource_vcd_nsxt_edgegateway_bgp_neighbor.go
- datasource_vcd_nsxt_edgegateway_bgp_prefix_list.go
- datasource_vcd_nsxt_edgegateway_dhcp_forwarding.go
- datasource_vcd_nsxt_edgegateway_dhcpv6.go
- datasource_vcd_nsxt_edgegateway_dns.go
- datasource_vcd_nsxt_edgegateway_l2_vpn_tunnel.go
- datasource_vcd_nsxt_edgegateway_qos_profile.go
- datasource_vcd_nsxt_edgegateway_rate_limiting.go
- datasource_vcd_nsxt_edgegateway_static_route.go
- datasource_vcd_nsxt_firewall.go
- datasource_vcd_nsxt_global_default_segment_profile_template.go
- datasource_vcd_nsxt_ip_set.go
- datasource_vcd_nsxt_ipsec_vpn_tunnel.go
- datasource_vcd_nsxt_manager.go
- datasource_vcd_nsxt_nat_rule.go
- datasource_vcd_nsxt_network_context_profile.go
- datasource_vcd_nsxt_network_dhcp.go
- datasource_vcd_nsxt_network_dhcp_binding.go
- datasource_vcd_nsxt_network_imported.go
- datasource_vcd_nsxt_network_segment_profile.go
- datasource_vcd_nsxt_route_advertisement.go
- datasource_vcd_nsxt_security_group.go
- datasource_vcd_nsxt_segment_ip_discovery_profile.go
- datasource_vcd_nsxt_segment_mac_discovery_profile.go
- datasource_vcd_nsxt_segment_profile_template.go
- datasource_vcd_nsxt_segment_qos_profile.go
- datasource_vcd_nsxt_segment_security_profile.go
- datasource_vcd_nsxt_segment_spoof_guard_profile.go
- datasource_vcd_nsxv_application.go
- datasource_vcd_nsxv_application_finder.go
- datasource_vcd_nsxv_application_group.go
- datasource_vcd_nsxv_dhcp_relay.go
- datasource_vcd_nsxv_distributed_firewall.go
- datasource_vcd_nsxv_dnat.go
- datasource_vcd_nsxv_firewall.go
- datasource_vcd_nsxv_snat.go
- datasource_vcd_org.go
- datasource_vcd_org_group.go
- datasource_vcd_org_ldap.go
- datasource_vcd_org_oidc.go
- datasource_vcd_org_saml.go
- datasource_vcd_org_saml_metadata.go
- datasource_vcd_org_user.go
- datasource_vcd_org_vdc.go
- datasource_vcd_org_vdc_network_profile.go
- datasource_vcd_org_vdc_template.go
- datasource_vcd_portgroup.go
- datasource_vcd_provider_vdc.go
- datasource_vcd_rde.go
- datasource_vcd_rde_behavior_invocation.go
- datasource_vcd_rde_interface.go
- datasource_vcd_rde_interface_behavior.go
- datasource_vcd_rde_type.go
- datasource_vcd_rde_type_behavior.go
- datasource_vcd_rde_type_behavior_acl.go
- datasource_vcd_resource_list.go
- datasource_vcd_resource_pool.go
- datasource_vcd_resource_schema.go
- datasource_vcd_right.go
- datasource_vcd_rights_bundle.go
- datasource_vcd_role.go
- datasource_vcd_service_account.go
- datasource_vcd_solution_add_on.go
- datasource_vcd_solution_add_on_instance.go
- datasource_vcd_solution_add_on_instance_publish.go
- datasource_vcd_solution_landing_zone.go
- datasource_vcd_storage_profile.go
- datasource_vcd_subscribed_catalog.go
- datasource_vcd_task.go
- datasource_vcd_ui_plugin.go
- datasource_vcd_vapp.go
- datasource_vcd_vapp_network.go
- datasource_vcd_vapp_org_network.go
- datasource_vcd_vapp_vm.go
- datasource_vcd_vcenter.go
- datasource_vcd_vdc_group.go
- datasource_vcd_version.go
- datasource_vcd_vgpu_profile.go
- datasource_vcd_vm.go
- datasource_vcd_vm_affinity_rule.go
- datasource_vcd_vm_group.go
- datasource_vcd_vm_placement_policy.go
- datasource_vcd_vm_sizing_policy.go
- datasource_vcd_vm_vgpu_policy.go
- filter.go
- filter_get.go
- hashcode.go
- helpers.go
- metadata.go
- metadata_openapi.go
- mutexkv.go
- nsxt_common.go
- nsxv_nat.go
- provider.go
- resource_vcd_api_filter.go
- resource_vcd_api_token.go
- resource_vcd_catalog.go
- resource_vcd_catalog_access_control.go
- resource_vcd_catalog_item.go
- resource_vcd_catalog_media.go
- resource_vcd_catalog_vapp_template.go
- resource_vcd_certificate_library.go
- resource_vcd_cloned_vapp.go
- resource_vcd_cse_kubernetes_cluster.go
- resource_vcd_dse_registry_configuration.go
- resource_vcd_dse_solution_publish.go
- resource_vcd_edgegateway.go
- resource_vcd_edgegateway_settings.go
- resource_vcd_edgegateway_vpn.go
- resource_vcd_external_endpoint.go
- resource_vcd_external_network.go
- resource_vcd_external_network_v2.go
- resource_vcd_global_role.go
- resource_vcd_independent_disk.go
- resource_vcd_inserted_media.go
- resource_vcd_ip_space.go
- resource_vcd_ip_space_custom_quota.go
- resource_vcd_ip_space_ip_allocation.go
- resource_vcd_ip_space_uplink.go
- resource_vcd_ipset.go
- resource_vcd_lb_app_profile.go
- resource_vcd_lb_app_rule.go
- resource_vcd_lb_server_pool.go
- resource_vcd_lb_service_monitor.go
- resource_vcd_lb_virtual_server.go
- resource_vcd_multisite_org_association.go
- resource_vcd_multisite_site_association.go
- resource_vcd_network_common.go
- resource_vcd_network_direct.go
- resource_vcd_network_isolated.go
- resource_vcd_network_isolated_v2.go
- resource_vcd_network_pool.go
- resource_vcd_network_routed.go
- resource_vcd_network_routed_v2.go
- resource_vcd_nsxt_alb_cloud.go
- resource_vcd_nsxt_alb_controller.go
- resource_vcd_nsxt_alb_edgegateway_service_engine_group.go
- resource_vcd_nsxt_alb_pool.go
- resource_vcd_nsxt_alb_service_engine_group.go
- resource_vcd_nsxt_alb_settings.go
- resource_vcd_nsxt_alb_virtual_service.go
- resource_vcd_nsxt_alb_virtual_service_req_rules.go
- resource_vcd_nsxt_alb_virtual_service_resp_rules.go
- resource_vcd_nsxt_alb_virtual_service_sec_rules.go
- resource_vcd_nsxt_app_port_profile.go
- resource_vcd_nsxt_distributed_firewall.go
- resource_vcd_nsxt_distributed_firewall_rule.go
- resource_vcd_nsxt_dynamic_security_group.go
- resource_vcd_nsxt_edgegateway.go
- resource_vcd_nsxt_edgegateway_bgp_configuration.go
- resource_vcd_nsxt_edgegateway_bgp_neighbor.go
- resource_vcd_nsxt_edgegateway_bgp_prefix_list.go
- resource_vcd_nsxt_edgegateway_dhcp_forwarding.go
- resource_vcd_nsxt_edgegateway_dhcpv6.go
- resource_vcd_nsxt_edgegateway_dns.go
- resource_vcd_nsxt_edgegateway_l2_vpn_tunnel.go
- resource_vcd_nsxt_edgegateway_rate_limiting.go
- resource_vcd_nsxt_edgegateway_static_route.go
- resource_vcd_nsxt_firewall.go
- resource_vcd_nsxt_global_default_segment_profile_template.go
- resource_vcd_nsxt_ip_set.go
- resource_vcd_nsxt_ipsec_vpn_tunnel.go
- resource_vcd_nsxt_nat_rule.go
- resource_vcd_nsxt_network_dhcp.go
- resource_vcd_nsxt_network_dhcp_binding.go
- resource_vcd_nsxt_network_imported.go
- resource_vcd_nsxt_network_segment_profile.go
- resource_vcd_nsxt_route_advertisement.go
- resource_vcd_nsxt_security_group.go
- resource_vcd_nsxt_segment_profile_template.go
- resource_vcd_nsxv_dhcp_relay.go
- resource_vcd_nsxv_distributed_firewall.go
- resource_vcd_nsxv_dnat.go
- resource_vcd_nsxv_firewall_rule.go
- resource_vcd_nsxv_snat.go
- resource_vcd_org.go
- resource_vcd_org_group.go
- resource_vcd_org_ldap.go
- resource_vcd_org_oidc.go
- resource_vcd_org_saml.go
- resource_vcd_org_user.go
- resource_vcd_org_vdc.go
- resource_vcd_org_vdc_access_control.go
- resource_vcd_org_vdc_network_profile.go
- resource_vcd_org_vdc_template.go
- resource_vcd_org_vdc_template_instance.go
- resource_vcd_provider_vdc.go
- resource_vcd_rde.go
- resource_vcd_rde_interface.go
- resource_vcd_rde_interface_behavior.go
- resource_vcd_rde_type.go
- resource_vcd_rde_type_behavior.go
- resource_vcd_rde_type_behavior_acl.go
- resource_vcd_rights_bundle.go
- resource_vcd_role.go
- resource_vcd_security_tag.go
- resource_vcd_service_account.go
- resource_vcd_solution_add_on.go
- resource_vcd_solution_add_on_instance.go
- resource_vcd_solution_add_on_instance_publish.go
- resource_vcd_solution_landing_zone.go
- resource_vcd_subscribed_catalog.go
- resource_vcd_ui_plugin.go
- resource_vcd_vapp.go
- resource_vcd_vapp_access_control.go
- resource_vcd_vapp_firewall_rules.go
- resource_vcd_vapp_nat_rules.go
- resource_vcd_vapp_network.go
- resource_vcd_vapp_org_network.go
- resource_vcd_vapp_static_routing.go
- resource_vcd_vapp_vm.go
- resource_vcd_vapp_vm_tools.go
- resource_vcd_vdc_group.go
- resource_vcd_vm.go
- resource_vcd_vm_affinity_rule.go
- resource_vcd_vm_internal_disk.go
- resource_vcd_vm_placement_policy.go
- resource_vcd_vm_sizing_policy.go
- resource_vcd_vm_vgpu_policy.go
- structure.go
- suppress_funcs.go
- validate_funcs.go
- vdc_group_common.go