diff --git a/config/beta/config.go b/config/beta/config.go new file mode 100644 index 0000000..c1acea6 --- /dev/null +++ b/config/beta/config.go @@ -0,0 +1,64 @@ +package beta + +import ( + "github.com/upbound/upjet/pkg/config" +) + +// ExternalNameConfigured returns a list of all external name resources +// configured for this provider. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("nsxt_cluster_virtual_ip", func(r *config.Resource) { + r.ShortGroup = "nsxt_cluster_virtual_ip" + r.Kind = "ClusterVirtualIp" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_compute_manager", func(r *config.Resource) { + r.ShortGroup = "nsxt_compute_manager" + r.Kind = "ComputeManager" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_edge_cluster", func(r *config.Resource) { + r.ShortGroup = "nsxt_edge_cluster" + r.Kind = "EdgeCluster" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_failure_domain", func(r *config.Resource) { + r.ShortGroup = "nsxt_failure_domain" + r.Kind = "FailureDomain" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_manager_cluster", func(r *config.Resource) { + r.ShortGroup = "nsxt_manager_cluster" + r.Kind = "ManagerCluster" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_host_transport_node_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_host_transport_node_profile" + r.Kind = "PolicyHostTransportNodeProfile" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_transport_zone", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_transport_zone" + r.Kind = "PolicyTransportZone" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_transport_node", func(r *config.Resource) { + r.ShortGroup = "nsxt_transport_node" + r.Kind = "TransportNode" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_uplink_host_switch_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_uplink_host_switch_profile" + r.Kind = "UplinkHostSwitchProfile" + r.Version = "v1alpha1" + }) + +} diff --git a/config/deprecated/config.go b/config/deprecated/config.go new file mode 100644 index 0000000..a787ba2 --- /dev/null +++ b/config/deprecated/config.go @@ -0,0 +1,302 @@ +package deprecated + +import ( + "github.com/upbound/upjet/pkg/config" +) + +// ExternalNameConfigured returns a list of all external name resources +// configured for this provider. +func Configure(p *config.Provider) { + + p.AddResourceConfigurator("nsxt_algorithm_type_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_algorithm_type_ns_service" + r.Kind = "AlgorithmTypeNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_dhcp_relay_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_dhcp_relay_profile" + r.Kind = "DhcpRelayProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_dhcp_relay_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_dhcp_relay_service" + r.Kind = "DhcpRelayService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_dhcp_server_ip_pool", func(r *config.Resource) { + r.ShortGroup = "nsxt_dhcp_server_ip_pool" + r.Kind = "DhcpServerIpPool" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_dhcp_server_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_dhcp_server_profile" + r.Kind = "DhcpServerProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ether_type_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_ether_type_ns_service" + r.Kind = "EtherTypeNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_firewall_section", func(r *config.Resource) { + r.ShortGroup = "nsxt_firewall_section" + r.Kind = "FirewallSection" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_icmp_type_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_icmp_type_ns_service" + r.Kind = "IcmpTypeNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_igmp_type_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_igmp_type_ns_service" + r.Kind = "IgmpTypeNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_block", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_block" + r.Kind = "IpBlock" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_block_subnet", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_block_subnet" + r.Kind = "IpBlockSubnet" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_discovery_switching_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_discovery_switching_profile" + r.Kind = "IpDiscoverySwitchingProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_pool", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_pool" + r.Kind = "IpPool" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_pool_allocation_ip_address", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_pool_allocation_ip_address" + r.Kind = "IpPoolAllocationIpAddress" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_protocol_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_protocol_ns_service" + r.Kind = "IpProtocolNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ip_set", func(r *config.Resource) { + r.ShortGroup = "nsxt_ip_set" + r.Kind = "IpSet" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_l4_port_set_ns_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_l4_port_set_ns_service" + r.Kind = "L4PortSetNsService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_client_ssl_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_client_ssl_profile" + r.Kind = "LbClientSslProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_cookie_persistence_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_cookie_persistence_profile" + r.Kind = "LbCookiePersistenceProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_fast_tcp_application_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_fast_tcp_application_profile" + r.Kind = "LbFastTcpApplicationProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_fast_udp_application_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_fast_udp_application_profile" + r.Kind = "LbFastUdpApplicationProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_application_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_application_profile" + r.Kind = "LbHttpApplicationProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_forwarding_rule", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_forwarding_rule" + r.Kind = "LbHttpForwardingRule" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_monitor" + r.Kind = "LbHttpMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_request_rewrite_rule", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_request_rewrite_rule" + r.Kind = "LbHttpRequestRewriteRule" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_response_rewrite_rule", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_response_rewrite_rule" + r.Kind = "LbHttpResponseRewriteRule" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_http_virtual_server", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_http_virtual_server" + r.Kind = "LbHttpVirtualServer" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_https_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_https_monitor" + r.Kind = "LbHttpsMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_icmp_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_icmp_monitor" + r.Kind = "LbIcmpMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_passive_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_passive_monitor" + r.Kind = "LbPassiveMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_pool", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_pool" + r.Kind = "LbPool" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_server_ssl_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_server_ssl_profile" + r.Kind = "LbServerSslProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_service" + r.Kind = "LbService" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_source_ip_persistence_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_source_ip_persistence_profile" + r.Kind = "LbSourceIpPersistenceProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_tcp_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_tcp_monitor" + r.Kind = "LbTcpMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_tcp_virtual_server", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_tcp_virtual_server" + r.Kind = "LbTcpVirtualServer" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_udp_monitor", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_udp_monitor" + r.Kind = "LbUdpMonitor" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_lb_udp_virtual_server", func(r *config.Resource) { + r.ShortGroup = "nsxt_lb_udp_virtual_server" + r.Kind = "LbUdpVirtualServer" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_dhcp_port", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_dhcp_port" + r.Kind = "LogicalDhcpPort" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_dhcp_server", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_dhcp_server" + r.Kind = "LogicalDhcpServer" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_port", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_port" + r.Kind = "LogicalPort" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_router_centralized_service_port", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_router_centralized_service_port" + r.Kind = "LogicalRouterCentralizedServicePort" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_router_downlink_port", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_router_downlink_port" + r.Kind = "LogicalRouterDownlinkPort" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_router_link_port_on_tier0", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_router_link_port_on_tier0" + r.Kind = "LogicalRouterLinkPortOnTier0" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_router_link_port_on_tier1", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_router_link_port_on_tier1" + r.Kind = "LogicalRouterLinkPortOnTier1" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_switch", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_switch" + r.Kind = "LogicalSwitch" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_tier0_router", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_tier0_router" + r.Kind = "LogicalTier0Router" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_logical_tier1_router", func(r *config.Resource) { + r.ShortGroup = "nsxt_logical_tier1_router" + r.Kind = "LogicalTier1Router" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_mac_management_switching_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_mac_management_switching_profile" + r.Kind = "MacManagementSwitchingProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_nat_rule", func(r *config.Resource) { + r.ShortGroup = "nsxt_nat_rule" + r.Kind = "NatRule" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ns_group", func(r *config.Resource) { + r.ShortGroup = "nsxt_ns_group" + r.Kind = "NsGroup" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_ns_service_group", func(r *config.Resource) { + r.ShortGroup = "nsxt_ns_service_group" + r.Kind = "NsServiceGroup" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_qos_switching_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_qos_switching_profile" + r.Kind = "QosSwitchingProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_spoofguard_switching_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_spoofguard_switching_profile" + r.Kind = "SpoofguardSwitchingProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_static_route", func(r *config.Resource) { + r.ShortGroup = "nsxt_static_route" + r.Kind = "StaticRoute" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_switch_security_switching_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_switch_security_switching_profile" + r.Kind = "SwitchSecuritySwitchingProfile" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_vlan_logical_switch", func(r *config.Resource) { + r.ShortGroup = "nsxt_vlan_logical_switch" + r.Kind = "VlanLogicalSwitch" + r.Version = "v1alpha1" + }) + p.AddResourceConfigurator("nsxt_vm_tags", func(r *config.Resource) { + r.ShortGroup = "nsxt_vm_tags" + r.Kind = "VmTags" + r.Version = "v1alpha1" + }) + +} diff --git a/config/external_name.go b/config/external_name.go index a891586..0ee4159 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -11,62 +11,136 @@ import "github.com/upbound/upjet/pkg/config" var ExternalNameConfigs = map[string]config.ExternalName{ // Import requires using a randomly generated ID from provider: nl-2e21sda - "nsxt_policy_dhcp_relay": config.IdentifierFromProvider, - "nsxt_policy_dhcp_server": config.IdentifierFromProvider, - "nsxt_policy_dhcp_v4_static_binding": config.IdentifierFromProvider, - "nsxt_policy_dhcp_v6_static_binding": config.IdentifierFromProvider, - "nsxt_policy_dns_forwarder_zone": config.IdentifierFromProvider, - "nsxt_policy_gateway_dns_forwarder": config.IdentifierFromProvider, - "nsxt_policy_evpn_config": config.IdentifierFromProvider, - "nsxt_policy_evpn_tenant": config.IdentifierFromProvider, - "nsxt_policy_evpn_tunnel_endpoint": config.IdentifierFromProvider, - "nsxt_policy_vni_pool": config.IdentifierFromProvider, - "nsxt_policy_context_profile": config.IdentifierFromProvider, - "nsxt_policy_context_profile_custom_attribute": config.IdentifierFromProvider, - "nsxt_policy_gateway_policy": config.IdentifierFromProvider, - "nsxt_policy_intrusion_service_policy": config.IdentifierFromProvider, - "nsxt_policy_intrusion_service_profile": config.IdentifierFromProvider, - "nsxt_policy_predefined_gateway_policy": config.IdentifierFromProvider, - "nsxt_policy_predefined_security_policy": config.IdentifierFromProvider, - "nsxt_policy_security_policy": config.IdentifierFromProvider, - "nsxt_policy_service": config.IdentifierFromProvider, - "nsxt_policy_bgp_config": config.IdentifierFromProvider, - "nsxt_policy_bgp_neighbor": config.IdentifierFromProvider, - "nsxt_policy_gateway_community_list": config.IdentifierFromProvider, - "nsxt_policy_gateway_prefix_list": config.IdentifierFromProvider, - "nsxt_policy_gateway_qos_profile": config.IdentifierFromProvider, - "nsxt_policy_gateway_redistribution_config": config.IdentifierFromProvider, - "nsxt_policy_gateway_route_map": config.IdentifierFromProvider, - "nsxt_policy_static_route_bfd_peer": config.IdentifierFromProvider, - "nsxt_policy_nat_rule": config.IdentifierFromProvider, - "nsxt_policy_ospf_config": config.IdentifierFromProvider, - "nsxt_policy_static_route": config.IdentifierFromProvider, - "nsxt_policy_tier0_gateway": config.IdentifierFromProvider, - "nsxt_policy_tier0_gateway_ha_vip_config": config.IdentifierFromProvider, - "nsxt_policy_tier0_gateway_interface": config.IdentifierFromProvider, - "nsxt_policy_tier1_gateway": config.IdentifierFromProvider, - "nsxt_policy_tier1_gateway_interface": config.IdentifierFromProvider, - "nsxt_policy_domain": config.IdentifierFromProvider, - "nsxt_policy_group": config.IdentifierFromProvider, - "nsxt_policy_vm_tags": config.IdentifierFromProvider, - "nsxt_policy_ip_address_allocation": config.IdentifierFromProvider, - "nsxt_policy_ip_block": config.IdentifierFromProvider, - "nsxt_policy_ip_pool": config.IdentifierFromProvider, - "nsxt_policy_ip_pool_block_subnet": config.IdentifierFromProvider, - "nsxt_policy_ip_pool_static_subnet": config.IdentifierFromProvider, - "nsxt_policy_lb_pool": config.IdentifierFromProvider, - "nsxt_policy_lb_service": config.IdentifierFromProvider, - "nsxt_policy_lb_virtual_server": config.IdentifierFromProvider, - "nsxt_policy_project": config.IdentifierFromProvider, - "nsxt_policy_fixed_segment": config.IdentifierFromProvider, - "nsxt_policy_ip_discovery_profile": config.IdentifierFromProvider, - "nsxt_policy_mac_discovery_profile": config.IdentifierFromProvider, - "nsxt_policy_qos_profile": config.IdentifierFromProvider, - "nsxt_policy_segment": config.IdentifierFromProvider, - "nsxt_policy_segment_security_profile": config.IdentifierFromProvider, - "nsxt_policy_spoof_guard_profile": config.IdentifierFromProvider, - "nsxt_policy_vlan_segment": config.IdentifierFromProvider, - + "nsxt_policy_dhcp_relay": config.IdentifierFromProvider, + "nsxt_policy_dhcp_server": config.IdentifierFromProvider, + "nsxt_policy_dhcp_v4_static_binding": config.IdentifierFromProvider, + "nsxt_policy_dhcp_v6_static_binding": config.IdentifierFromProvider, + "nsxt_policy_dns_forwarder_zone": config.IdentifierFromProvider, + "nsxt_policy_gateway_dns_forwarder": config.IdentifierFromProvider, + "nsxt_policy_evpn_config": config.IdentifierFromProvider, + "nsxt_policy_evpn_tenant": config.IdentifierFromProvider, + "nsxt_policy_evpn_tunnel_endpoint": config.IdentifierFromProvider, + "nsxt_policy_vni_pool": config.IdentifierFromProvider, + "nsxt_policy_context_profile": config.IdentifierFromProvider, + "nsxt_policy_context_profile_custom_attribute": config.IdentifierFromProvider, + "nsxt_policy_gateway_policy": config.IdentifierFromProvider, + "nsxt_policy_intrusion_service_policy": config.IdentifierFromProvider, + "nsxt_policy_intrusion_service_profile": config.IdentifierFromProvider, + "nsxt_policy_predefined_gateway_policy": config.IdentifierFromProvider, + "nsxt_policy_predefined_security_policy": config.IdentifierFromProvider, + "nsxt_policy_security_policy": config.IdentifierFromProvider, + "nsxt_policy_service": config.IdentifierFromProvider, + "nsxt_policy_bgp_config": config.IdentifierFromProvider, + "nsxt_policy_bgp_neighbor": config.IdentifierFromProvider, + "nsxt_policy_gateway_community_list": config.IdentifierFromProvider, + "nsxt_policy_gateway_prefix_list": config.IdentifierFromProvider, + "nsxt_policy_gateway_qos_profile": config.IdentifierFromProvider, + "nsxt_policy_gateway_redistribution_config": config.IdentifierFromProvider, + "nsxt_policy_gateway_route_map": config.IdentifierFromProvider, + "nsxt_policy_static_route_bfd_peer": config.IdentifierFromProvider, + "nsxt_policy_nat_rule": config.IdentifierFromProvider, + "nsxt_policy_ospf_config": config.IdentifierFromProvider, + "nsxt_policy_static_route": config.IdentifierFromProvider, + "nsxt_policy_tier0_gateway": config.IdentifierFromProvider, + "nsxt_policy_tier0_gateway_ha_vip_config": config.IdentifierFromProvider, + "nsxt_policy_tier0_gateway_interface": config.IdentifierFromProvider, + "nsxt_policy_tier1_gateway": config.IdentifierFromProvider, + "nsxt_policy_tier1_gateway_interface": config.IdentifierFromProvider, + "nsxt_policy_domain": config.IdentifierFromProvider, + "nsxt_policy_group": config.IdentifierFromProvider, + "nsxt_policy_vm_tags": config.IdentifierFromProvider, + "nsxt_policy_ip_address_allocation": config.IdentifierFromProvider, + "nsxt_policy_ip_block": config.IdentifierFromProvider, + "nsxt_policy_ip_pool": config.IdentifierFromProvider, + "nsxt_policy_ip_pool_block_subnet": config.IdentifierFromProvider, + "nsxt_policy_ip_pool_static_subnet": config.IdentifierFromProvider, + "nsxt_policy_lb_pool": config.IdentifierFromProvider, + "nsxt_policy_lb_service": config.IdentifierFromProvider, + "nsxt_policy_lb_virtual_server": config.IdentifierFromProvider, + "nsxt_policy_project": config.IdentifierFromProvider, + "nsxt_policy_fixed_segment": config.IdentifierFromProvider, + "nsxt_policy_ip_discovery_profile": config.IdentifierFromProvider, + "nsxt_policy_mac_discovery_profile": config.IdentifierFromProvider, + "nsxt_policy_qos_profile": config.IdentifierFromProvider, + "nsxt_policy_segment": config.IdentifierFromProvider, + "nsxt_policy_segment_security_profile": config.IdentifierFromProvider, + "nsxt_policy_spoof_guard_profile": config.IdentifierFromProvider, + "nsxt_policy_vlan_segment": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_dpd_profile": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_ike_profile": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_local_endpoint": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_session": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_service": config.IdentifierFromProvider, + "nsxt_policy_ipsec_vpn_vpn_tunnel_profile": config.IdentifierFromProvider, + "nsxt_policy_l2_vpn_server": config.IdentifierFromProvider, + "nsxt_policy_l2_vpn_session": config.IdentifierFromProvider, + "nsxt_cluster_virtual_ip": config.IdentifierFromProvider, + "nsxt_compute_manager": config.IdentifierFromProvider, + "nsxt_edge_cluster": config.IdentifierFromProvider, + "nsxt_failure_domain": config.IdentifierFromProvider, + "nsxt_manager_cluster": config.IdentifierFromProvider, + "nsxt_policy_host_transport_node_profile": config.IdentifierFromProvider, + "nsxt_policy_transport_zone": config.IdentifierFromProvider, + "nsxt_transport_node": config.IdentifierFromProvider, + "nsxt_uplink_host_switch_profile": config.IdentifierFromProvider, + "nsxt_algorithm_type_ns_service": config.IdentifierFromProvider, + "nsxt_dhcp_relay_profile": config.IdentifierFromProvider, + "nsxt_dhcp_relay_service": config.IdentifierFromProvider, + "nsxt_dhcp_server_ip_pool": config.IdentifierFromProvider, + "nsxt_dhcp_server_profile": config.IdentifierFromProvider, + "nsxt_ether_type_ns_service": config.IdentifierFromProvider, + "nsxt_firewall_section": config.IdentifierFromProvider, + "nsxt_icmp_type_ns_service": config.IdentifierFromProvider, + "nsxt_igmp_type_ns_service": config.IdentifierFromProvider, + "nsxt_ip_block": config.IdentifierFromProvider, + "nsxt_ip_block_subnet": config.IdentifierFromProvider, + "nsxt_ip_discovery_switching_profile": config.IdentifierFromProvider, + "nsxt_ip_pool": config.IdentifierFromProvider, + "nsxt_ip_pool_allocation_ip_address": config.IdentifierFromProvider, + "nsxt_ip_protocol_ns_service": config.IdentifierFromProvider, + "nsxt_ip_set": config.IdentifierFromProvider, + "nsxt_l4_port_set_ns_service": config.IdentifierFromProvider, + "nsxt_lb_client_ssl_profile": config.IdentifierFromProvider, + "nsxt_lb_cookie_persistence_profile": config.IdentifierFromProvider, + "nsxt_lb_fast_tcp_application_profile": config.IdentifierFromProvider, + "nsxt_lb_fast_udp_application_profile": config.IdentifierFromProvider, + "nsxt_lb_http_application_profile": config.IdentifierFromProvider, + "nsxt_lb_http_forwarding_rule": config.IdentifierFromProvider, + "nsxt_lb_http_monitor": config.IdentifierFromProvider, + "nsxt_lb_http_request_rewrite_rule": config.IdentifierFromProvider, + "nsxt_lb_http_response_rewrite_rule": config.IdentifierFromProvider, + "nsxt_lb_http_virtual_server": config.IdentifierFromProvider, + "nsxt_lb_https_monitor": config.IdentifierFromProvider, + "nsxt_lb_icmp_monitor": config.IdentifierFromProvider, + "nsxt_lb_passive_monitor": config.IdentifierFromProvider, + "nsxt_lb_pool": config.IdentifierFromProvider, + "nsxt_lb_server_ssl_profile": config.IdentifierFromProvider, + "nsxt_lb_service": config.IdentifierFromProvider, + "nsxt_lb_source_ip_persistence_profile": config.IdentifierFromProvider, + "nsxt_lb_tcp_monitor": config.IdentifierFromProvider, + "nsxt_lb_tcp_virtual_server": config.IdentifierFromProvider, + "nsxt_lb_udp_monitor": config.IdentifierFromProvider, + "nsxt_lb_udp_virtual_server": config.IdentifierFromProvider, + "nsxt_logical_dhcp_port": config.IdentifierFromProvider, + "nsxt_logical_dhcp_server": config.IdentifierFromProvider, + "nsxt_logical_port": config.IdentifierFromProvider, + "nsxt_logical_router_centralized_service_port": config.IdentifierFromProvider, + "nsxt_logical_router_downlink_port": config.IdentifierFromProvider, + "nsxt_logical_router_link_port_on_tier0": config.IdentifierFromProvider, + "nsxt_logical_router_link_port_on_tier1": config.IdentifierFromProvider, + "nsxt_logical_switch": config.IdentifierFromProvider, + "nsxt_logical_tier0_router": config.IdentifierFromProvider, + "nsxt_logical_tier1_router": config.IdentifierFromProvider, + "nsxt_mac_management_switching_profile": config.IdentifierFromProvider, + "nsxt_nat_rule": config.IdentifierFromProvider, + "nsxt_ns_group": config.IdentifierFromProvider, + "nsxt_ns_service_group": config.IdentifierFromProvider, + "nsxt_qos_switching_profile": config.IdentifierFromProvider, + "nsxt_spoofguard_switching_profile": config.IdentifierFromProvider, + "nsxt_static_route": config.IdentifierFromProvider, + "nsxt_switch_security_switching_profile": config.IdentifierFromProvider, + "nsxt_vlan_logical_switch": config.IdentifierFromProvider, + "nsxt_vm_tags": config.IdentifierFromProvider, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index ca07461..7696e4d 100644 --- a/config/provider.go +++ b/config/provider.go @@ -10,6 +10,8 @@ import ( ujconfig "github.com/upbound/upjet/pkg/config" + beta "github.com/ankasoftco/provider-nsxt/config/beta" + depcreated "github.com/ankasoftco/provider-nsxt/config/depcreated" dhcp "github.com/ankasoftco/provider-nsxt/config/dhcp" dns "github.com/ankasoftco/provider-nsxt/config/dns" evpn "github.com/ankasoftco/provider-nsxt/config/evpn" @@ -21,10 +23,7 @@ import ( multitenancy "github.com/ankasoftco/provider-nsxt/config/multitenancy" ospf "github.com/ankasoftco/provider-nsxt/config/ospf" segments "github.com/ankasoftco/provider-nsxt/config/segments" - - - - + vpn "github.com/ankasoftco/provider-nsxt/config/vpn" ) const ( @@ -55,12 +54,15 @@ func GetProvider() *ujconfig.Provider { evpn.Configure, firewall.Configure, gatewaysandrouting.Configure, - gatewaysandrouting.Configure, + groupingandtagging.Configure, ipam.Configure, loadbalancer.Configure, multitenancy.Configure, ospf.Configure, segments.Configure, + vpn.Configure, + beta.Configure, + depcreated.Configure, } { configure(pc) } diff --git a/config/vpn/config.go b/config/vpn/config.go new file mode 100644 index 0000000..95e7aab --- /dev/null +++ b/config/vpn/config.go @@ -0,0 +1,57 @@ +package vpn + +import "github.com/upbound/upjet/pkg/config" + +func Configure(p *config.Provider) { + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_dpd_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_dpd_profile" + r.Kind = "PolicyIpsecVpnDpdProfile" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_local_endpoint", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_local_endpoint" + r.Kind = "PolicyIpsecVpnLocalEndpoint" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_ike_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_ike_profile" + r.Kind = "PolicyIpsecVpnIkeProfile" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_session", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_session" + r.Kind = "PolicyIpsecVpnSession" + r.Version = "v1alpha1" + + }) + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_service", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_service" + r.Kind = "PolicyIpsecVpnService" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_ipsec_vpn_tunnel_profile", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_ipsec_vpn_tunnel_profile" + r.Kind = "PolicyIpsecVpnTunnelProfile" + r.Version = "v1alpha1" + + }) + + p.AddResourceConfigurator("nsxt_policy_l2_vpn_server", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_l2_vpn_server" + r.Kind = "PolicyL2VpnServer" + r.Version = "v1alpha1" + }) + + p.AddResourceConfigurator("nsxt_policy_l2_vpn_session", func(r *config.Resource) { + r.ShortGroup = "nsxt_policy_l2_vpn_session" + r.Kind = "PolicyL2VpnSession" + r.Version = "v1alpha1" + }) + +}