This message was deleted.
# google-cloud
s
This message was deleted.
c
I've had the same problem, fortunately Cloud run has an URL pattern that you can use.
Copy code
https://<serviceName>-<projectHash>-<region>.<http://run.app|run.app>
projectHash is generated by the Platform, and you need to deploy a cloud run app to figure out what it is. region is a little bit odd, us-central1 is uc.a and europe-west1 is ew.a for instance
a
mh. Well, in theory the information is there.
Copy code
service.Statuses
is an array of ServiceStatusInput. ServiceStatusInput contains an URL property - which is an StringPtrOutput But
Copy code
PushConfig: &pubsub.SubscriptionPushConfigArgs {
			PushEndpoint: service.Statuses.Index(<http://pulumi.Int|pulumi.Int>(0)).Url(),
		},
will not compile as
PushEndpoint
accepted StringInputs only
c
Try something like this, haven't compiled it but maybe works:
Copy code
PushConfig: &pubsub.SubscriptionPushConfigArgs {
			PushEndpoint: service.Statuses.Index(<http://pulumi.Int|pulumi.Int>(0)).Url().ApplyString(func(v interface{}) (result string, err error) {
				result, ok := v.(string)
				if !ok {
					return result, errors.New("could not convert to string")
				}
				return result, nil
			}),
		},
a
works @creamy-engine-1851 with a minor adaption for the type. indeed it is *string
Copy code
service.Statuses.Index(<http://pulumi.Int|pulumi.Int>(0)).Url().ApplyString(func(v interface{}) (result string, err error) {
		rawUrl, ok := v.(*string)
		if !ok {
			return *rawUrl, errors.New("could not convert to string")
		}
		return *rawUrl, nil
	})
✔️ 1