https://pulumi.com logo
l

little-energy-64187

08/09/2019, 2:53 PM
Any ideas on how to import a regionless (global) static ip? I tried with a custom provider but still hitting this:
Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'
w

white-balloon-205

08/09/2019, 3:16 PM
That error message should only be reported if the resource in question expects a
region
. Can you share the code snippet you are trying to use?
l

little-energy-64187

08/09/2019, 3:57 PM
first I tried
Copy code
export const addr = new gcp.compute.Address("name", {
        project: "project",
        name: "name",
    }, { import: "name" })
It errored with resource does not exists. Then I suspected the region might be the problem since that's set globally by the stack
gcp:zone: europe-west2-c
, so then I tried
Copy code
const regionlessProvider = new gcp.Provider("project", { project: "project" })
    export const addr = new gcp.compute.Address("name", {
        project: "project",
        name: "name",
    }, { import: "name", provider: regionlessProvider })
which yields the error above
I am still hoping to work around this somehow. Any ideas?
c

cool-egg-852

08/14/2019, 4:49 PM
Can you put
region: 'global'
? Does that work? Or maybe
region: ''
?
l

little-energy-64187

08/14/2019, 4:53 PM
doesn't work unfortunately
ah my bad, there is a seprate endpoint on gcp, which maps to
gcp.compute.GlobalAddress
not
gcp.compute.Address