Open sfc-gh-raram opened 4 months ago
Hi @sfc-gh-raram thanks for getting in touch.
pulumi about
). Hi @danielrbradley . I am using the pulumi provider v1.103.0
.
It will be difficult to upgrade the provider version due to the current set up, so I may not be able to answer your second question.
I will work on enabling verbose logging, and let you know.
I also tested it in v2.34.0
and encountered the same issue.
@danielrbradley Is my way of getting the ip address from the private endpoint correct? I also tried using the custom config struct field and attempted to get it through the private dns zone, but no luck.
privateEndpoint.NetworkInterfaces.Index(pulumi.Int(0)).IpConfigurations().Index(pulumi.Int(0)).PrivateIPAddress().Elem()
Thanks for the extra info @sfc-gh-raram
Recapping what we know:
NetworkInterfaces
or IpConfigurations
lists are empty and therefore throw an error when attempting to access the first element.Does that look correct?
When you look at the state, do you see these properties in the outputs (run pulumi stack export
then search for test-traffic-privatelink-private-endpoint
and look at the outputs)? Having a redacted copy of the resource's state in this issue might also help us to narrow down the issue and be easier than looking at the verbose logs for the HTTP responses.
You could also look at what the ARM template looks like for the resource in the Azure portal as that should match the shape of the Pulumi resource properties.
Hello everyone,
I have same issue with retrieving IP address from Private Endpoint, IP address is dynamically populated during the creation of resource.
Code is following:
kv_private_endpoint = azure_native.network.PrivateEndpoint( "KeyVaulPE", resource_group_name=resource_group.name, location=resource_group.location, private_link_service_connections=[azure_native.network.PrivateLinkServiceConnectionArgs( name="KV_private_link_service_connection", private_link_service_id=key_vault.id, group_ids=["vault"] )], subnet=azure_native.network.SubnetArgs( id=next(iter(snets.values())) ), opts=pulumi.ResourceOptions( provider=provider) ) kv_private_endpoint.network_interfaces.apply(lambda plsc: print(f"{plsc[0].ip_configurations}"))
This code prints None
value, even though resource is created and IP address is associated, so i can't even print IP address because it will drop indexation error, cause ip_configurations is none.
I'm using pulumi_azure_native provider v2.44.0
Hello everyone, I have same issue with retrieving IP address from Private Endpoint, IP address is dynamically populated during the creation of resource. Code is following:
kv_private_endpoint = azure_native.network.PrivateEndpoint( "KeyVaulPE", resource_group_name=resource_group.name, location=resource_group.location, private_link_service_connections=[azure_native.network.PrivateLinkServiceConnectionArgs( name="KV_private_link_service_connection", private_link_service_id=key_vault.id, group_ids=["vault"] )], subnet=azure_native.network.SubnetArgs( id=next(iter(snets.values())) ), opts=pulumi.ResourceOptions( provider=provider) ) kv_private_endpoint.network_interfaces.apply(lambda plsc: print(f"{plsc[0].ip_configurations}"))
This code printsNone
value, even though resource is created and IP address is associated, so i can't even print IP address because it will drop indexation error, cause ip_configurations is none. I'm using pulumi_azure_native provider v2.44.0
having the same issue with python provider v2.36.0 and worked around it with this snippet:
pep = azure_native.network.PrivateEndpoint(...)
ip = pep.network_interfaces.apply(lambda nics:
azure_native.network.get_network_interface(
network_interface_name=nics[0].id.split("/")[-1],
resource_group_name="my-azure-rg",
).ip_configurations[0].private_ip_address)
wouldn't mind ditching the workaround though.
Thanks for the workaround @maribowman - that looks like a good approach.
It's also interesting narrowing the issue down to the fact that the PrivateEndpoint does include the ids of each network interface, but is missing the IP configurations.
It would appear that this is likely an issue with the Azure service returning responses which don't satisfy the schema (missing the ipConfigurations
). To confirm this we either need a minimal program with which we quickly reproduce this issue or sanitised verbose logs which show the raw responses from the Azure service to identify if it's missing there or it's a bug in the provider.
What happened?
Hi team. I'm working on creating a private endpoint, private dns zone, and A records that use the ip address from the private endpoint using the pulumi azure sdk for go. I'm running into a strange issue where I am unable to retrieve the ip address of the private endpoint despite it being created and being able to see it in the Azure console.
I'm attempting to get the ip address through the NetworkInteraces field, which in turn I get the IP configurations field from. However, this leads to a index out of bounds error since the network interface does not have any ip configuration. I find this bizarre since I can see it in the console. I also tried getting the ip address through the custom dns config field, however that is empty. I also tried getting it through the privatednszonegroup but the ip configuration were also empty.
I consulted the below two issues raised previously, but they did not help unfortunately. I would appreciate any help on this issue, thank you. https://github.com/pulumi/pulumi-azure-native/issues/2830 https://github.com/pulumi/pulumi-azure-native/issues/1707
Example
Output of
pulumi about
Pulumi version: v3.74.0
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).