@grucloud/provider-google
Version:
The GruCloud Google Cloud Platform provider
21 lines (18 loc) • 541 B
JavaScript
exports.GCP_COMPUTE_BASE_URL = "https://www.googleapis.com/compute/v1";
const { eq, get, pipe, tap } = require("rubico");
const { find } = require("rubico/x");
exports.findDependenciesNetwork = ({ live, lives, providerName }) => ({
type: "Network",
group: "compute",
ids: pipe([
() => live,
get("network"),
(network) =>
pipe([
lives.getByType({ type: "Network", group: "compute", providerName }),
find(eq(get("live.selfLink"), network)),
get("id"),
])(),
(id) => [id],
])(),
});