Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with with defining httpListeners inside @pulumi/azure-native.network.ApplicationGateway #3740

Open
talk2davidboon opened this issue Nov 29, 2024 · 1 comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec

Comments

@talk2davidboon
Copy link

talk2davidboon commented Nov 29, 2024

What happened?

We are using @pulumi/azure-native.network.ApplicationGateway and difining httpListeners inside the ApplicationGateway, since frontendIPConfiguration adds circular dependcy on ApplicationGateway , we get below error which says we are trying to use the resouce which is not created or availabl yet, and we are not allowed to define httpListeners separately and bind later too.

Looking for any help regarding this.

Below is the error (Note have replaced the actual subscription_id with {subscription_id} in the below error to avoid sharing {subscription_id} )

azure-native:network:ApplicationGateway (applicationgatewaypulumi):
    error: Code="InvalidResourceReference" Message="Resource /subscriptions/{subscription_id}/resourceGroups/N00100_WESTEUROPE/providers/Microsoft.Network/applicationGateways/APPLICATIONGATEWAYPULUMI referenced by resource /subscriptions/{subscription_id}/resourceGroups/N00100_westeurope/providers/Microsoft.Network/applicationGateways/applicationgatewaypulumif04def58 was not found. Please make sure that the referenced resource exists, and that both resources are in the same region." 
	Details=
	
	[
		{
			"code": "NotFound",
			"message": "Resource /subscriptions/{subscription_id}/resourceGroups/N00100_WESTEUROPE/providers/Microsoft.Network/applicationGateways/APPLICATIONGATEWAYPULUMI not found."
		}
	]

Below is the code to define httpListeners inside ApplicationGateway

httpListeners: 
[{
      name: listenerName,
      frontendIPConfiguration: {
        id: pulumi.interpolate`/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${resourceGroup.name}/providers/Microsoft.Network/applicationGateways/${APPLICATION_GATEWAY_NAME}/frontendIPConfigurations/${frontendIpConfigurationName}`,
        },
        frontendPort: {
            id: pulumi.interpolate`/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${resourceGroup.name}/providers/Microsoft.Network/applicationGateways/${APPLICATION_GATEWAY_NAME}/frontendPorts/${frontendPortName}`,
        },
        protocol: "Http",
    }]

Output of pulumi about

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).

@talk2davidboon talk2davidboon added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 29, 2024
@thomas11
Copy link
Contributor

thomas11 commented Dec 2, 2024

Hi @talk2davidboon, it would be helpful if you could post your complete ApplicationGateway definition at least - ideally, a full runnable Pulumi program. The message

Resource /subscriptions/{subscription_id}/resourceGroups/N00100_WESTEUROPE/providers/Microsoft.Network/applicationGateways/APPLICATIONGATEWAYPULUMI referenced by resource /subscriptions/{subscription_id}/resourceGroups/N00100_westeurope/providers/Microsoft.Network/applicationGateways/applicationgatewaypulumif04def58 was not found.

suggests an application gateway referencing an application gateway, which seems potentially off.

In the meantime, here's a complete example from Azure in JSON API request form which may be helpful as a reference.

@thomas11 thomas11 added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants