UNPKG

@pulumi/gcp

Version:

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

257 lines (256 loc) • 9.43 kB
import * as pulumi from "@pulumi/pulumi"; /** * A domain name that is associated with a backend. * * ## Example Usage * * ### Firebase App Hosting Default 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: "service-account", * displayName: "Firebase App Hosting compute service account", * createIgnoreAlreadyExists: true, * }); * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", { * project: "my-project-name", * location: "us-central1", * backendId: "dd-mini", * appId: "1:0000000000:web:674cde32020e16fbce9dbd", * servingLocality: "GLOBAL_ACCESS", * serviceAccount: serviceAccount.email, * }); * const example = new gcp.firebase.AppHostingDefaultDomain("example", { * project: exampleAppHostingBackend.project, * location: exampleAppHostingBackend.location, * backend: exampleAppHostingBackend.backendId, * domainId: exampleAppHostingBackend.uri, * }); * ``` * ### Firebase App Hosting Default 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: "service-account", * displayName: "Firebase App Hosting compute service account", * createIgnoreAlreadyExists: true, * }); * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", { * project: "my-project-name", * location: "us-central1", * backendId: "dd-full", * appId: "1:0000000000:web:674cde32020e16fbce9dbd", * servingLocality: "GLOBAL_ACCESS", * serviceAccount: serviceAccount.email, * }); * const example = new gcp.firebase.AppHostingDefaultDomain("example", { * project: exampleAppHostingBackend.project, * location: exampleAppHostingBackend.location, * backend: exampleAppHostingBackend.backendId, * domainId: exampleAppHostingBackend.uri, * disabled: false, * }); * ``` * ### Firebase App Hosting Default Domain Disabled * * ```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: "service-account", * displayName: "Firebase App Hosting compute service account", * createIgnoreAlreadyExists: true, * }); * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", { * project: "my-project-name", * location: "us-central1", * backendId: "dd-disabled", * appId: "1:0000000000:web:674cde32020e16fbce9dbd", * servingLocality: "GLOBAL_ACCESS", * serviceAccount: serviceAccount.email, * }); * const example = new gcp.firebase.AppHostingDefaultDomain("example", { * project: exampleAppHostingBackend.project, * location: exampleAppHostingBackend.location, * backend: exampleAppHostingBackend.backendId, * domainId: exampleAppHostingBackend.uri, * disabled: true, * }); * ``` * * ## Import * * DefaultDomain 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, DefaultDomain can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default projects/{{project}}/locations/{{location}}/backends/{{backend}}/domains/{{domain_id}} * ``` * * ```sh * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default {{project}}/{{location}}/{{backend}}/{{domain_id}} * ``` * * ```sh * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default {{location}}/{{backend}}/{{domain_id}} * ``` */ export declare class AppHostingDefaultDomain extends pulumi.CustomResource { /** * Get an existing AppHostingDefaultDomain 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?: AppHostingDefaultDomainState, opts?: pulumi.CustomResourceOptions): AppHostingDefaultDomain; /** * Returns true if the given object is an instance of AppHostingDefaultDomain. 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 AppHostingDefaultDomain; /** * 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>; /** * Whether the domain is disabled. Defaults to false. */ readonly disabled: pulumi.Output<boolean>; /** * Id of the domain. For default domain, it should be {{backend}}--{{project_id}}.{{location}}.hosted.app */ 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>; /** * System-assigned, unique identifier. */ readonly uid: pulumi.Output<string>; /** * Time at which the domain was last updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a AppHostingDefaultDomain 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: AppHostingDefaultDomainArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AppHostingDefaultDomain resources. */ export interface AppHostingDefaultDomainState { /** * 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>; /** * Whether the domain is disabled. Defaults to false. */ disabled?: pulumi.Input<boolean>; /** * Id of the domain. For default domain, it should be {{backend}}--{{project_id}}.{{location}}.hosted.app */ 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>; /** * 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 AppHostingDefaultDomain resource. */ export interface AppHostingDefaultDomainArgs { /** * The ID of the Backend that this Domain is associated with */ backend: pulumi.Input<string>; /** * Whether the domain is disabled. Defaults to false. */ disabled?: pulumi.Input<boolean>; /** * Id of the domain. For default domain, it should be {{backend}}--{{project_id}}.{{location}}.hosted.app */ 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>; }