nitrictech / cli

Nitric CLI. Manage and run Nitric apps locally and deploy to any cloud.
https://nitric.io
Apache License 2.0
26 stars 10 forks source link

Azure api error when testing with the test-app #131

Closed asalkeld closed 2 years ago

asalkeld commented 2 years ago

When deploying github.com/asalkeld/test-app/ I got the following error.

 pulumi:pulumi:Stack test-app-test-app-dep running waiting for store to start before creating subscriptions
              pulumi:pulumi:Stack test-app-test-app-dep running creating subscriptions for store
              pulumi:pulumi:Stack test-app-test-app-dep running error: an unhandled error occurred: waiting for RPCs: api nitric-testr returned nil serviceUrl
              nitric:func:ContainerApps containerApps  
              pulumi:pulumi:Stack test-app-test-app-dep **failed** 1 error; 1 warning; 1 message
              nitric:storage:AzureStorage storage  
              nitric:api:AzureApiManagement subscriptions  

this happens here: https://github.com/nitrictech/cli/blob/develop/pkg/provider/pulumi/azure/apimanagement.go#L95-L100 when we are trying to get the apiendpoint.. cc @tjholm

tjholm commented 2 years ago

@asalkeld we're probably better off extracting this value post deployment as an output rather than trying to read and export it during the deployment.

If this is for listing endpoints for urls, we should be able to iterate the deployed resources in the stack after running Up, find the deployed Apis and access the service Url as an output.