@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
273 lines (272 loc) • 9.68 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A domain name that is associated with a backend.
*
* ## Example Usage
*
* ### Firebase App Hosting Domain Minimal
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const serviceAccount = new gcp.serviceaccount.Account("service_account", {
* project: "my-project-name",
* accountId: "sa-id",
* displayName: "Firebase App Hosting compute service account",
* createIgnoreAlreadyExists: true,
* });
* const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
* project: "my-project-name",
* location: "us-central1",
* backendId: "domain-mini",
* appId: "1:0000000000:web:674cde32020e16fbce9dbd",
* servingLocality: "GLOBAL_ACCESS",
* serviceAccount: serviceAccount.email,
* });
* const example = new gcp.firebase.AppHostingDomain("example", {
* project: exampleAppHostingBackend.project,
* location: exampleAppHostingBackend.location,
* backend: exampleAppHostingBackend.backendId,
* domainId: "example.com",
* });
* ```
* ### Firebase App Hosting Domain Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const serviceAccount = new gcp.serviceaccount.Account("service_account", {
* project: "my-project-name",
* accountId: "sa-id",
* displayName: "Firebase App Hosting compute service account",
* createIgnoreAlreadyExists: true,
* });
* const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
* project: "my-project-name",
* location: "us-central1",
* backendId: "domain-full",
* appId: "1:0000000000:web:674cde32020e16fbce9dbd",
* servingLocality: "GLOBAL_ACCESS",
* serviceAccount: serviceAccount.email,
* });
* const example = new gcp.firebase.AppHostingDomain("example", {
* project: exampleAppHostingBackend.project,
* location: exampleAppHostingBackend.location,
* backend: exampleAppHostingBackend.backendId,
* domainId: "example.com",
* serve: {
* redirect: {
* uri: "google.com",
* status: "302",
* },
* },
* });
* ```
*
* ## Import
*
* Domain can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/backends/{{backend}}/domains/{{domain_id}}`
*
* * `{{project}}/{{location}}/{{backend}}/{{domain_id}}`
*
* * `{{location}}/{{backend}}/{{domain_id}}`
*
* When using the `pulumi import` command, Domain can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/appHostingDomain:AppHostingDomain default projects/{{project}}/locations/{{location}}/backends/{{backend}}/domains/{{domain_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/appHostingDomain:AppHostingDomain default {{project}}/{{location}}/{{backend}}/{{domain_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/appHostingDomain:AppHostingDomain default {{location}}/{{backend}}/{{domain_id}}
* ```
*/
export declare class AppHostingDomain extends pulumi.CustomResource {
/**
* Get an existing AppHostingDomain resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AppHostingDomainState, opts?: pulumi.CustomResourceOptions): AppHostingDomain;
/**
* Returns true if the given object is an instance of AppHostingDomain. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AppHostingDomain;
/**
* The ID of the Backend that this Domain is associated with
*/
readonly backend: pulumi.Output<string>;
/**
* Time at which the domain was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* The status of a custom domain's linkage to the Backend.
* Structure is documented below.
*/
readonly customDomainStatuses: pulumi.Output<outputs.firebase.AppHostingDomainCustomDomainStatus[]>;
/**
* Time at which the domain was deleted.
*/
readonly deleteTime: pulumi.Output<string>;
/**
* Id of the domain to create.
* Must be a valid domain name, such as "foo.com"
*/
readonly domainId: pulumi.Output<string>;
/**
* Server-computed checksum based on other values; may be sent
* on update or delete to ensure operation is done on expected resource.
*/
readonly etag: pulumi.Output<string>;
/**
* The location of the Backend that this Domain is associated with
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. The resource name of the domain, e.g.
* `projects/{project}/locations/{locationId}/backends/{backendId}/domains/{domainId}`
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Time at which a soft-deleted domain will be purged, rendering in
* permanently deleted.
*/
readonly purgeTime: pulumi.Output<string>;
/**
* The serving behavior of the domain. If specified, the domain will
* serve content other than its Backend's live content.
* Structure is documented below.
*/
readonly serve: pulumi.Output<outputs.firebase.AppHostingDomainServe | undefined>;
/**
* System-assigned, unique identifier.
*/
readonly uid: pulumi.Output<string>;
/**
* Time at which the domain was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a AppHostingDomain resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AppHostingDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AppHostingDomain resources.
*/
export interface AppHostingDomainState {
/**
* The ID of the Backend that this Domain is associated with
*/
backend?: pulumi.Input<string>;
/**
* Time at which the domain was created.
*/
createTime?: pulumi.Input<string>;
/**
* The status of a custom domain's linkage to the Backend.
* Structure is documented below.
*/
customDomainStatuses?: pulumi.Input<pulumi.Input<inputs.firebase.AppHostingDomainCustomDomainStatus>[]>;
/**
* Time at which the domain was deleted.
*/
deleteTime?: pulumi.Input<string>;
/**
* Id of the domain to create.
* Must be a valid domain name, such as "foo.com"
*/
domainId?: pulumi.Input<string>;
/**
* Server-computed checksum based on other values; may be sent
* on update or delete to ensure operation is done on expected resource.
*/
etag?: pulumi.Input<string>;
/**
* The location of the Backend that this Domain is associated with
*/
location?: pulumi.Input<string>;
/**
* Identifier. The resource name of the domain, e.g.
* `projects/{project}/locations/{locationId}/backends/{backendId}/domains/{domainId}`
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Time at which a soft-deleted domain will be purged, rendering in
* permanently deleted.
*/
purgeTime?: pulumi.Input<string>;
/**
* The serving behavior of the domain. If specified, the domain will
* serve content other than its Backend's live content.
* Structure is documented below.
*/
serve?: pulumi.Input<inputs.firebase.AppHostingDomainServe>;
/**
* System-assigned, unique identifier.
*/
uid?: pulumi.Input<string>;
/**
* Time at which the domain was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AppHostingDomain resource.
*/
export interface AppHostingDomainArgs {
/**
* The ID of the Backend that this Domain is associated with
*/
backend: pulumi.Input<string>;
/**
* Id of the domain to create.
* Must be a valid domain name, such as "foo.com"
*/
domainId: pulumi.Input<string>;
/**
* The location of the Backend that this Domain is associated with
*/
location: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The serving behavior of the domain. If specified, the domain will
* serve content other than its Backend's live content.
* Structure is documented below.
*/
serve?: pulumi.Input<inputs.firebase.AppHostingDomainServe>;
}