UNPKG

@pulumi/gcp

Version:

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

194 lines 7.76 kB
import * as pulumi from "@pulumi/pulumi"; /** * For more information, see: * * [Get started with Firebase Security Rules](https://firebase.google.com/docs/rules/get-started) * ## Example Usage * * ### Firestore_release * Creates a Firebase Rules Release to the default Cloud Firestore instance * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const firestore = new gcp.firebaserules.Ruleset("firestore", { * project: "my-project-name", * source: { * files: [{ * content: "service cloud.firestore {match /databases/{database}/documents { match /{document=**} { allow read, write: if false; } } }", * name: "firestore.rules", * }], * }, * }); * const primary = new gcp.firebaserules.Release("primary", { * name: "cloud.firestore", * project: "my-project-name", * rulesetName: pulumi.interpolate`projects/my-project-name/rulesets/${firestore.name}`, * }); * ``` * ### Firestore_release_additional * Creates a Firebase Rules Release to an additional Cloud Firestore instance * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const firestore = new gcp.firebaserules.Ruleset("firestore", { * project: "my-project-name", * source: { * files: [{ * content: "service cloud.firestore {match /databases/{database}/documents { match /{document=**} { allow read, write: if false; } } }", * name: "firestore.rules", * }], * }, * }); * const primary = new gcp.firebaserules.Release("primary", { * name: "cloud.firestore/database", * project: "my-project-name", * rulesetName: pulumi.interpolate`projects/my-project-name/rulesets/${firestore.name}`, * }); * ``` * ## Import * * Release can be imported using any of these accepted formats: * * `projects/{{project}}/releases/{{name}}` * * When using the `pulumi import` command, Release can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:firebaserules/release:Release default projects/{{project}}/releases/{{name}} * ``` */ export declare class Release extends pulumi.CustomResource { /** * Get an existing Release 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?: ReleaseState, opts?: pulumi.CustomResourceOptions): Release; /** * Returns true if the given object is an instance of Release. 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 Release; /** * Output only. Time the release was created. */ readonly createTime: pulumi.Output<string>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE". * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ readonly deletionPolicy: pulumi.Output<string>; /** * Disable the release to keep it from being served. The response code of NOT_FOUND will be given for executables generated from this Release. */ readonly disabled: pulumi.Output<boolean>; /** * Format: `projects/{project_id}/releases/{release_id}`\Firestore Rules Releases will **always** have the name 'cloud.firestore' */ readonly name: pulumi.Output<string>; /** * The project for the resource */ readonly project: pulumi.Output<string>; /** * Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. * * * * - - - */ readonly rulesetName: pulumi.Output<string>; /** * Output only. Time the release was updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a Release 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: ReleaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Release resources. */ export interface ReleaseState { /** * Output only. Time the release was created. */ createTime?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE". * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * Disable the release to keep it from being served. The response code of NOT_FOUND will be given for executables generated from this Release. */ disabled?: pulumi.Input<boolean | undefined>; /** * Format: `projects/{project_id}/releases/{release_id}`\Firestore Rules Releases will **always** have the name 'cloud.firestore' */ name?: pulumi.Input<string | undefined>; /** * The project for the resource */ project?: pulumi.Input<string | undefined>; /** * Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. * * * * - - - */ rulesetName?: pulumi.Input<string | undefined>; /** * Output only. Time the release was updated. */ updateTime?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a Release resource. */ export interface ReleaseArgs { /** * Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE". * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * Format: `projects/{project_id}/releases/{release_id}`\Firestore Rules Releases will **always** have the name 'cloud.firestore' */ name?: pulumi.Input<string | undefined>; /** * The project for the resource */ project?: pulumi.Input<string | undefined>; /** * Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. * * * * - - - */ rulesetName: pulumi.Input<string>; } //# sourceMappingURL=release.d.ts.map