Any ideas on how to import a regionless (global) s...
# general
l
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
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
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
Can you put
region: 'global'
? Does that work? Or maybe
region: ''
?
l
doesn't work unfortunately
ah my bad, there is a seprate endpoint on gcp, which maps to
gcp.compute.GlobalAddress
not
gcp.compute.Address