Skip to content

Commit

Permalink
[APIT-2332] Add private_endpoint_custom_dns_config_domains to Azure…
Browse files Browse the repository at this point in the history
… Outbound Private Link (#2860)
  • Loading branch information
sgagniere authored Aug 23, 2024
1 parent 9c45b53 commit 564343d
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 66 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0
github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0
github.com/confluentinc/ccloud-sdk-go-v2/networking v0.12.0
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.2.0
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.3.0
github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.2.0
github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0
github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 h1:TWwZHdfo2XNKrnGOuxXx4
github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0/go.mod h1:odGsHChrn2l+jaOvx4Gib5//U4a3Id79wstQVkNh8v0=
github.com/confluentinc/ccloud-sdk-go-v2/networking v0.12.0 h1:eaIjlpKyjW6WgOKqR2/v1oITgK/m/eg4PdIrmIN8fbc=
github.com/confluentinc/ccloud-sdk-go-v2/networking v0.12.0/go.mod h1:jL9lLHYwFKzCJE5Fh62UdRqJCMJ9T/xg5QOdnQRYIUg=
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.2.0 h1:aRK2GFLzCWms5Nl5OlMtIFwOl/vUgzczsV2D4di0e/4=
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.2.0/go.mod h1:HV1xGUwTsGEU3Mgvc+7Ya/0HRpUO69L2rqqxO7LeWMc=
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.3.0 h1:8STgb5JDV6QFhZIGzvLuGA3eC1aIUBcqW6zS8pHN6BU=
github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.3.0/go.mod h1:HV1xGUwTsGEU3Mgvc+7Ya/0HRpUO69L2rqqxO7LeWMc=
github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.2.0 h1:OdIeCGfy8iQ2Bm+08CDXYttwZOUme0e9FVGrBjBJGx4=
github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.2.0/go.mod h1:472T8ufudvXgXea2BhYxhE/2eowwhoulZzboDh6+ec4=
github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 h1:ZHNF2DeqVlNPuKGZ41SBMLGj8GBlvvcwOPnfZLZXA/4=
Expand Down
29 changes: 15 additions & 14 deletions internal/network/command_access_point.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ type accessPointCommand struct {
}

type accessPointOut struct {
Id string `human:"ID" serialized:"id"`
Name string `human:"Name,omitempty" serialized:"name,omitempty"`
AwsVpcEndpointService string `human:"AWS VPC Endpoint Service,omitempty" serialized:"aws_vpc_endpoint_service,omitempty"`
AwsVpcEndpoint string `human:"AWS VPC Endpoint,omitempty" serialized:"aws_vpc_endpoint,omitempty"`
AwsVpcEndpointDnsName string `human:"AWS VPC Endpoint DNS Name,omitempty" serialized:"aws_vpc_endpoint_dns_name,omitempty"`
AzurePrivateLinkService string `human:"Azure Private Link Service,omitempty" serialized:"azure_private_link_service,omitempty"`
AzurePrivateLinkSubresourceName string `human:"Azure Private Link Subresource Name,omitempty" serialized:"azure_private_link_subresource_name,omitempty"`
AzurePrivateEndpoint string `human:"Azure Private Endpoint,omitempty" serialized:"azure_private_endpoint,omitempty"`
AzurePrivateEndpointDomain string `human:"Azure Private Endpoint Domain,omitempty" serialized:"azure_private_endpoint_domain,omitempty"`
AzurePrivateEndpointIpAddress string `human:"Azure Private Endpoint IP Address,omitempty" serialized:"azure_private_endpoint_ip_address,omitempty"`
HighAvailability bool `human:"High Availability,omitempty" serialized:"high_availability,omitempty"`
Environment string `human:"Environment" serialized:"environment"`
Gateway string `human:"Gateway" serialized:"gateway"`
Phase string `human:"Phase" serialized:"phase"`
Id string `human:"ID" serialized:"id"`
Name string `human:"Name,omitempty" serialized:"name,omitempty"`
AwsVpcEndpointService string `human:"AWS VPC Endpoint Service,omitempty" serialized:"aws_vpc_endpoint_service,omitempty"`
AwsVpcEndpoint string `human:"AWS VPC Endpoint,omitempty" serialized:"aws_vpc_endpoint,omitempty"`
AwsVpcEndpointDnsName string `human:"AWS VPC Endpoint DNS Name,omitempty" serialized:"aws_vpc_endpoint_dns_name,omitempty"`
AzurePrivateLinkService string `human:"Azure Private Link Service,omitempty" serialized:"azure_private_link_service,omitempty"`
AzurePrivateLinkSubresourceName string `human:"Azure Private Link Subresource Name,omitempty" serialized:"azure_private_link_subresource_name,omitempty"`
AzurePrivateEndpoint string `human:"Azure Private Endpoint,omitempty" serialized:"azure_private_endpoint,omitempty"`
AzurePrivateEndpointDomain string `human:"Azure Private Endpoint Domain,omitempty" serialized:"azure_private_endpoint_domain,omitempty"`
AzurePrivateEndpointIpAddress string `human:"Azure Private Endpoint IP Address,omitempty" serialized:"azure_private_endpoint_ip_address,omitempty"`
AzurePrivateEndpointCustomDnsConfigDomains []string `human:"Azure Private Endpoint Custom DNS Config Domains,omitempty" serialized:"azure_private_endpoint_custom_dns_config_domains,omitempty"`
HighAvailability bool `human:"High Availability,omitempty" serialized:"high_availability,omitempty"`
Environment string `human:"Environment" serialized:"environment"`
Gateway string `human:"Gateway" serialized:"gateway"`
Phase string `human:"Phase" serialized:"phase"`
}

func newAccessPointCommand(prerunner pcmd.PreRunner) *cobra.Command {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func printPrivateLinkEgressEndpointTable(cmd *cobra.Command, egressEndpoint netw
out.AzurePrivateEndpoint = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointResourceId()
out.AzurePrivateEndpointDomain = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointDomain()
out.AzurePrivateEndpointIpAddress = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointIpAddress()
out.AzurePrivateEndpointCustomDnsConfigDomains = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointCustomDnsConfigDomains()
}

table := output.NewTable(cmd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (c *accessPointCommand) list(cmd *cobra.Command, _ []string) error {
out.AzurePrivateEndpoint = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointResourceId()
out.AzurePrivateEndpointDomain = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointDomain()
out.AzurePrivateEndpointIpAddress = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointIpAddress()
out.AzurePrivateEndpointCustomDnsConfigDomains = egressEndpoint.Status.Config.NetworkingV1AzureEgressPrivateLinkEndpointStatus.GetPrivateEndpointCustomDnsConfigDomains()
}

list.Add(out)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| ID | ap-67890 |
| Name | my-egress-endpoint |
| Azure Private Link Service | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName |
| Azure Private Link Subresource Name | subresource1 |
| Azure Private Endpoint | private-endpoint-id |
| Azure Private Endpoint Domain | domain.com |
| Azure Private Endpoint IP Address | 10.2.0.68 |
| Environment | env-596 |
| Gateway | gw-123456 |
| Phase | READY |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| ID | ap-67890 |
| Name | my-egress-endpoint |
| Azure Private Link Service | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName |
| Azure Private Link Subresource Name | subresource1 |
| Azure Private Endpoint | private-endpoint-id |
| Azure Private Endpoint Domain | domain.com |
| Azure Private Endpoint IP Address | 10.2.0.68 |
| Azure Private Endpoint Custom DNS Config Domains | dbname.database.windows.net, dbname-region.database.windows.net |
| Environment | env-596 |
| Gateway | gw-123456 |
| Phase | READY |
+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| ID | ap-67890 |
| Name | my-azure-egress-access-point |
| Azure Private Link Service | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName |
| Azure Private Link Subresource Name | subresource |
| Azure Private Endpoint | private-endpoint-id |
| Azure Private Endpoint Domain | domain.com |
| Azure Private Endpoint IP Address | 10.2.0.68 |
| Environment | env-596 |
| Gateway | gw-12345 |
| Phase | READY |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| ID | ap-67890 |
| Name | my-azure-egress-access-point |
| Azure Private Link Service | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName |
| Azure Private Link Subresource Name | subresource |
| Azure Private Endpoint | private-endpoint-id |
| Azure Private Endpoint Domain | domain.com |
| Azure Private Endpoint IP Address | 10.2.0.68 |
| Azure Private Endpoint Custom DNS Config Domains | dbname.database.windows.net, dbname-region.database.windows.net |
| Environment | env-596 |
| Gateway | gw-12345 |
| Phase | READY |
+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"azure_private_endpoint": "private-endpoint-id",
"azure_private_endpoint_domain": "domain.com",
"azure_private_endpoint_ip_address": "10.2.0.68",
"azure_private_endpoint_custom_dns_config_domains": [
"dbname.database.windows.net",
"dbname-region.database.windows.net"
],
"environment": "env-596",
"gateway": "gw-12345",
"phase": "READY"
Expand Down
Loading

0 comments on commit 564343d

Please sign in to comment.