UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

98 lines 3.45 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getLocationsOutput = exports.getLocations = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get Artifact Registry locations available for a project. * * To get more information about Artifact Registry, see: * * * [API documentation](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations/list) * * How-to Guides * * [Official Documentation](https://cloud.google.com/artifact-registry/docs/overview) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.artifactregistry.getLocations({}); * ``` * * ### Multi-Regional Artifact Registry Deployment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.artifactregistry.getLocations({}); * const repoOne = new gcp.artifactregistry.Repository("repo_one", { * location: available.then(available => available.locations?.[0]), * repositoryId: "repo-one", * format: "apt", * }); * const repoTwo = new gcp.artifactregistry.Repository("repo_two", { * location: available.then(available => available.locations?.[1]), * repositoryId: "repo-two", * format: "apt", * }); * ``` */ function getLocations(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:artifactregistry/getLocations:getLocations", { "project": args.project, }, opts); } exports.getLocations = getLocations; /** * Get Artifact Registry locations available for a project. * * To get more information about Artifact Registry, see: * * * [API documentation](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations/list) * * How-to Guides * * [Official Documentation](https://cloud.google.com/artifact-registry/docs/overview) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.artifactregistry.getLocations({}); * ``` * * ### Multi-Regional Artifact Registry Deployment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const available = gcp.artifactregistry.getLocations({}); * const repoOne = new gcp.artifactregistry.Repository("repo_one", { * location: available.then(available => available.locations?.[0]), * repositoryId: "repo-one", * format: "apt", * }); * const repoTwo = new gcp.artifactregistry.Repository("repo_two", { * location: available.then(available => available.locations?.[1]), * repositoryId: "repo-two", * format: "apt", * }); * ``` */ function getLocationsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:artifactregistry/getLocations:getLocations", { "project": args.project, }, opts); } exports.getLocationsOutput = getLocationsOutput; //# sourceMappingURL=getLocations.js.map