You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was creating a Data connector in Azure and found a bit confusing the parameters requirements for vnet_id and subnet_id as they are not looking for the resources ID's instead looking for the vnet and subnet names respectively, looking at the code below (occm_azure.go lines 93-104)I can see the Resource ID string gets created based on the parameters provided.
Replace the parameters vnet_id and subnet_id for vnet_name and subnet_name to be consistent with the AzureRM provider.
Provide vnet_id and subnet_id as the Resource ID's of the resources and removing the string manipulation to generate the Resource ID within the code. Provisioning infrastructure using terraform we can pass on this ID as part of the vnet and subnet creation as those attributes are exportable e.g. azurerm_virtual_network. However, that will mean a breaking change.
Hope that provides some context
The text was updated successfully, but these errors were encountered:
I was creating a Data connector in Azure and found a bit confusing the parameters requirements for
vnet_id
andsubnet_id
as they are not looking for the resources ID's instead looking for the vnet and subnet names respectively, looking at the code below (occm_azure.go
lines 93-104)I can see the Resource ID string gets created based on the parameters provided.if occmDetails.VnetResourceGroup != "" { registerAgentTOService.Placement.Network = fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", occmDetails.SubscriptionID, occmDetails.VnetResourceGroup, occmDetails.VnetID) } else { registerAgentTOService.Placement.Network = fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", occmDetails.SubscriptionID, occmDetails.ResourceGroup, occmDetails.VnetID) } registerAgentTOService.Placement.Subnet = fmt.Sprintf("%s/subnets/%s", registerAgentTOService.Placement.Network, occmDetails.SubnetID) userData, newClientID, err := c.getCustomData(registerAgentTOService, proxyCertificates, clientID) if err != nil { return OCCMMResult{}, err }
I can see there are two options
Replace the parameters
vnet_id
andsubnet_id
forvnet_name
andsubnet_name
to be consistent with the AzureRM provider.Provide
vnet_id
andsubnet_id
as the Resource ID's of the resources and removing the string manipulation to generate the Resource ID within the code. Provisioning infrastructure using terraform we can pass on this ID as part of the vnet and subnet creation as those attributes are exportable e.g.azurerm_virtual_network
. However, that will mean a breaking change.Hope that provides some context
The text was updated successfully, but these errors were encountered: