import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * A single build for a backend, at a specific point codebase reference tag
 * and point in time. Encapsulates several resources, including an Artifact Registry
 * container image, a Cloud Build invocation that built the image, and the
 * Cloud Run revision that uses that image.
 *
 * ## Example Usage
 *
 * ### Firebase App Hosting Build Minimal
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * //## Include these blocks only once per project if you are starting from scratch ###
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     project: "my-project-name",
 *     accountId: "firebase-app-hosting-compute",
 *     displayName: "Firebase App Hosting compute service account",
 *     createIgnoreAlreadyExists: true,
 * });
 * const fah = new gcp.projects.Service("fah", {
 *     project: "my-project-name",
 *     service: "firebaseapphosting.googleapis.com",
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "mini",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: serviceAccount.email,
 * }, {
 *     dependsOn: [fah],
 * });
 * const example = new gcp.firebase.AppHostingBuild("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     buildId: "mini-build",
 *     source: {
 *         container: {
 *             image: "us-docker.pkg.dev/cloudrun/container/hello",
 *         },
 *     },
 * });
 * const appHostingSaRunner = new gcp.projects.IAMMember("app_hosting_sa_runner", {
 *     project: "my-project-name",
 *     role: "roles/firebaseapphosting.computeRunner",
 *     member: serviceAccount.member,
 * });
 * ```
 * ### Firebase App Hosting Build Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * //## Include these blocks only once per project if you are starting from scratch ###
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     project: "my-project-name",
 *     accountId: "firebase-app-hosting-compute",
 *     displayName: "Firebase App Hosting compute service account",
 *     createIgnoreAlreadyExists: true,
 * });
 * const fah = new gcp.projects.Service("fah", {
 *     project: "my-project-name",
 *     service: "firebaseapphosting.googleapis.com",
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "full",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: serviceAccount.email,
 * }, {
 *     dependsOn: [fah],
 * });
 * const example = new gcp.firebase.AppHostingBuild("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     buildId: "full-build",
 *     displayName: "My Build",
 *     annotations: {
 *         key: "value",
 *     },
 *     labels: {
 *         key: "value",
 *     },
 *     source: {
 *         container: {
 *             image: "us-docker.pkg.dev/cloudrun/container/hello",
 *         },
 *     },
 * });
 * const appHostingSaRunner = new gcp.projects.IAMMember("app_hosting_sa_runner", {
 *     project: "my-project-name",
 *     role: "roles/firebaseapphosting.computeRunner",
 *     member: serviceAccount.member,
 * });
 * ```
 * ### Firebase App Hosting Build Github
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const my_repository = new gcp.developerconnect.GitRepositoryLink("my-repository", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     service: "developerconnect.googleapis.com",
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "mini",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     displayName: "My Backend",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: "firebase-app-hosting-compute@my-project-name.iam.gserviceaccount.com",
 *     environment: "prod",
 *     annotations: {
 *         key: "value",
 *     },
 *     labels: {
 *         key: "value",
 *     },
 *     codebase: {
 *         repository: my_repository.name,
 *         rootDirectory: "/",
 *     },
 * });
 * const example = new gcp.firebase.AppHostingBuild("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     buildId: "gh-build",
 *     source: {
 *         codebase: {
 *             branch: "main",
 *         },
 *     },
 * });
 * const devconnect_secret = new gcp.projects.IAMMember("devconnect-secret", {
 *     project: "my-project-name",
 *     role: "roles/secretmanager.admin",
 *     member: devconnect_p4sa.member,
 * });
 * //##
 * //## Include these blocks only once per Github account ###
 * const my_connection = new gcp.developerconnect.Connection("my-connection", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     connectionId: "tf-test-connection-new",
 *     githubConfig: {
 *         githubApp: "FIREBASE",
 *     },
 * }, {
 *     dependsOn: [devconnect_secret],
 * });
 * export const nextSteps = my_connection.installationStates;
 * ```
 *
 * ## Import
 *
 * Build can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/backends/{{backend}}/builds/{{build_id}}`
 *
 * * `{{project}}/{{location}}/{{backend}}/{{build_id}}`
 *
 * * `{{location}}/{{backend}}/{{build_id}}`
 *
 * When using the `pulumi import` command, Build can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingBuild:AppHostingBuild default projects/{{project}}/locations/{{location}}/backends/{{backend}}/builds/{{build_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingBuild:AppHostingBuild default {{project}}/{{location}}/{{backend}}/{{build_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingBuild:AppHostingBuild default {{location}}/{{backend}}/{{build_id}}
 * ```
 */
export declare class AppHostingBuild extends pulumi.CustomResource {
    /**
     * Get an existing AppHostingBuild 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?: AppHostingBuildState, opts?: pulumi.CustomResourceOptions): AppHostingBuild;
    /**
     * Returns true if the given object is an instance of AppHostingBuild.  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 AppHostingBuild;
    /**
     * Unstructured key value map that may be set by external tools to
     * store and arbitrary metadata. They are not queryable and should be
     * preserved when modifying objects.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
     */
    readonly annotations: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * The ID of the Backend that this Build applies to
     */
    readonly backend: pulumi.Output<string>;
    /**
     * The user-specified ID of the build being created.
     */
    readonly buildId: pulumi.Output<string>;
    /**
     * The location of the [Cloud Build
     * logs](https://cloud.google.com/build/docs/view-build-results) for the build
     * process.
     */
    readonly buildLogsUri: pulumi.Output<string>;
    /**
     * Time at which the build was created.
     */
    readonly createTime: pulumi.Output<string>;
    /**
     * Human-readable name. 63 character limit.
     */
    readonly displayName: pulumi.Output<string | undefined>;
    readonly effectiveAnnotations: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    readonly effectiveLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * The environment name of the backend when this build was created.
     */
    readonly environment: pulumi.Output<string>;
    /**
     * The source of the error for the build, if in a `FAILED` state.
     * Possible values:
     * CLOUD_BUILD
     * CLOUD_RUN
     */
    readonly errorSource: pulumi.Output<string>;
    /**
     * The `Status` type defines a logical error model that is suitable for
     * different programming environments, including REST APIs and RPC APIs. It is
     * used by [gRPC](https://github.com/grpc). Each `Status` message contains
     * three pieces of data: error code, error message, and error details.
     * You can find out more about this error model and how to work with it in the
     * [API Design Guide](https://cloud.google.com/apis/design/errors).
     * Structure is documented below.
     */
    readonly errors: pulumi.Output<outputs.firebase.AppHostingBuildError[]>;
    /**
     * 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 Artifact Registry
     * [container
     * image](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories.dockerImages)
     * URI, used by the Cloud Run
     * [`revision`](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services.revisions)
     * for this build.
     */
    readonly image: pulumi.Output<string>;
    /**
     * Unstructured key value map that can be used to organize and categorize
     * objects.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    readonly labels: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * The location of the Backend that this Build applies to
     */
    readonly location: pulumi.Output<string>;
    /**
     * Identifier. The resource name of the build.
     * Format:
     * `projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}`.
     */
    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>;
    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    readonly pulumiLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * The source for the build.
     * Structure is documented below.
     */
    readonly source: pulumi.Output<outputs.firebase.AppHostingBuildSource>;
    /**
     * The state of the build.
     * Possible values:
     * BUILDING
     * BUILT
     * DEPLOYING
     * READY
     * FAILED
     */
    readonly state: pulumi.Output<string>;
    /**
     * System-assigned, unique identifier.
     */
    readonly uid: pulumi.Output<string>;
    /**
     * Time at which the build was last updated.
     */
    readonly updateTime: pulumi.Output<string>;
    /**
     * Create a AppHostingBuild 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: AppHostingBuildArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering AppHostingBuild resources.
 */
export interface AppHostingBuildState {
    /**
     * Unstructured key value map that may be set by external tools to
     * store and arbitrary metadata. They are not queryable and should be
     * preserved when modifying objects.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
     */
    annotations?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The ID of the Backend that this Build applies to
     */
    backend?: pulumi.Input<string>;
    /**
     * The user-specified ID of the build being created.
     */
    buildId?: pulumi.Input<string>;
    /**
     * The location of the [Cloud Build
     * logs](https://cloud.google.com/build/docs/view-build-results) for the build
     * process.
     */
    buildLogsUri?: pulumi.Input<string>;
    /**
     * Time at which the build was created.
     */
    createTime?: pulumi.Input<string>;
    /**
     * Human-readable name. 63 character limit.
     */
    displayName?: pulumi.Input<string>;
    effectiveAnnotations?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    effectiveLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The environment name of the backend when this build was created.
     */
    environment?: pulumi.Input<string>;
    /**
     * The source of the error for the build, if in a `FAILED` state.
     * Possible values:
     * CLOUD_BUILD
     * CLOUD_RUN
     */
    errorSource?: pulumi.Input<string>;
    /**
     * The `Status` type defines a logical error model that is suitable for
     * different programming environments, including REST APIs and RPC APIs. It is
     * used by [gRPC](https://github.com/grpc). Each `Status` message contains
     * three pieces of data: error code, error message, and error details.
     * You can find out more about this error model and how to work with it in the
     * [API Design Guide](https://cloud.google.com/apis/design/errors).
     * Structure is documented below.
     */
    errors?: pulumi.Input<pulumi.Input<inputs.firebase.AppHostingBuildError>[]>;
    /**
     * 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 Artifact Registry
     * [container
     * image](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories.dockerImages)
     * URI, used by the Cloud Run
     * [`revision`](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services.revisions)
     * for this build.
     */
    image?: pulumi.Input<string>;
    /**
     * Unstructured key value map that can be used to organize and categorize
     * objects.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The location of the Backend that this Build applies to
     */
    location?: pulumi.Input<string>;
    /**
     * Identifier. The resource name of the build.
     * Format:
     * `projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}`.
     */
    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>;
    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    pulumiLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The source for the build.
     * Structure is documented below.
     */
    source?: pulumi.Input<inputs.firebase.AppHostingBuildSource>;
    /**
     * The state of the build.
     * Possible values:
     * BUILDING
     * BUILT
     * DEPLOYING
     * READY
     * FAILED
     */
    state?: pulumi.Input<string>;
    /**
     * System-assigned, unique identifier.
     */
    uid?: pulumi.Input<string>;
    /**
     * Time at which the build was last updated.
     */
    updateTime?: pulumi.Input<string>;
}
/**
 * The set of arguments for constructing a AppHostingBuild resource.
 */
export interface AppHostingBuildArgs {
    /**
     * Unstructured key value map that may be set by external tools to
     * store and arbitrary metadata. They are not queryable and should be
     * preserved when modifying objects.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
     */
    annotations?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The ID of the Backend that this Build applies to
     */
    backend: pulumi.Input<string>;
    /**
     * The user-specified ID of the build being created.
     */
    buildId: pulumi.Input<string>;
    /**
     * Human-readable name. 63 character limit.
     */
    displayName?: pulumi.Input<string>;
    /**
     * Unstructured key value map that can be used to organize and categorize
     * objects.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The location of the Backend that this Build applies to
     */
    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 source for the build.
     * Structure is documented below.
     */
    source: pulumi.Input<inputs.firebase.AppHostingBuildSource>;
}
