UNPKG

@pulumi/gcp

Version:

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

198 lines (197 loc) 8.31 kB
import * as pulumi from "@pulumi/pulumi"; /** * An app's DeviceCheck configuration object. Note that the Team ID registered with your * app is used as part of the validation process. Make sure your `gcp.firebase.AppleApp` has a teamId present. * * To get more information about DeviceCheckConfig, see: * * * [API documentation](https://firebase.google.com/docs/reference/appcheck/rest/v1/projects.apps.deviceCheckConfig) * * How-to Guides * * [Official Documentation](https://firebase.google.com/docs/app-check) * * ## Example Usage * * ### Firebase App Check Device Check Config Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * import * as time from "@pulumiverse/time"; * * const _default = new gcp.firebase.AppleApp("default", { * project: "my-project-name", * displayName: "Apple app", * bundleId: "bundle.id.devicecheck", * teamId: "9987654321", * }); * // It takes a while for App Check to recognize the new app * // If your app already exists, you don't have to wait 30 seconds. * const wait30s = new time.index.Sleep("wait_30s", {createDuration: "30s"}, { * dependsOn: [_default], * }); * const defaultAppCheckDeviceCheckConfig = new gcp.firebase.AppCheckDeviceCheckConfig("default", { * project: "my-project-name", * appId: _default.appId, * tokenTtl: "7200s", * keyId: "Key ID", * privateKey: std.file({ * input: "path/to/private-key.p8", * }).then(invoke => invoke.result), * }, { * dependsOn: [wait30s], * }); * ``` * * ## Import * * DeviceCheckConfig can be imported using any of these accepted formats: * * * `projects/{{project}}/apps/{{app_id}}/deviceCheckConfig` * * * `{{project}}/{{app_id}}` * * * `{{app_id}}` * * When using the `pulumi import` command, DeviceCheckConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:firebase/appCheckDeviceCheckConfig:AppCheckDeviceCheckConfig default projects/{{project}}/apps/{{app_id}}/deviceCheckConfig * ``` * * ```sh * $ pulumi import gcp:firebase/appCheckDeviceCheckConfig:AppCheckDeviceCheckConfig default {{project}}/{{app_id}} * ``` * * ```sh * $ pulumi import gcp:firebase/appCheckDeviceCheckConfig:AppCheckDeviceCheckConfig default {{app_id}} * ``` */ export declare class AppCheckDeviceCheckConfig extends pulumi.CustomResource { /** * Get an existing AppCheckDeviceCheckConfig 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?: AppCheckDeviceCheckConfigState, opts?: pulumi.CustomResourceOptions): AppCheckDeviceCheckConfig; /** * Returns true if the given object is an instance of AppCheckDeviceCheckConfig. 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 AppCheckDeviceCheckConfig; /** * The ID of an * [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id). */ readonly appId: pulumi.Output<string>; /** * The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. */ readonly keyId: pulumi.Output<string>; /** * The relative resource name of the DeviceCheck configuration object */ readonly name: pulumi.Output<string>; /** * The contents of the private key (.p8) file associated with the key specified by keyId. * **Note**: This property is sensitive and will not be displayed in the plan. */ readonly privateKey: pulumi.Output<string>; /** * Whether the privateKey field was previously set. Since App Check will never return the * privateKey field, this field is the only way to find out whether it was previously set. */ readonly privateKeySet: pulumi.Output<boolean>; /** * 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>; /** * Specifies the duration for which App Check tokens exchanged from DeviceCheck artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ readonly tokenTtl: pulumi.Output<string>; /** * Create a AppCheckDeviceCheckConfig 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: AppCheckDeviceCheckConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AppCheckDeviceCheckConfig resources. */ export interface AppCheckDeviceCheckConfigState { /** * The ID of an * [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id). */ appId?: pulumi.Input<string>; /** * The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. */ keyId?: pulumi.Input<string>; /** * The relative resource name of the DeviceCheck configuration object */ name?: pulumi.Input<string>; /** * The contents of the private key (.p8) file associated with the key specified by keyId. * **Note**: This property is sensitive and will not be displayed in the plan. */ privateKey?: pulumi.Input<string>; /** * Whether the privateKey field was previously set. Since App Check will never return the * privateKey field, this field is the only way to find out whether it was previously set. */ privateKeySet?: pulumi.Input<boolean>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Specifies the duration for which App Check tokens exchanged from DeviceCheck artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ tokenTtl?: pulumi.Input<string>; } /** * The set of arguments for constructing a AppCheckDeviceCheckConfig resource. */ export interface AppCheckDeviceCheckConfigArgs { /** * The ID of an * [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id). */ appId: pulumi.Input<string>; /** * The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. */ keyId: pulumi.Input<string>; /** * The contents of the private key (.p8) file associated with the key specified by keyId. * **Note**: This property is sensitive and will not be displayed in the plan. */ privateKey: 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>; /** * Specifies the duration for which App Check tokens exchanged from DeviceCheck artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ tokenTtl?: pulumi.Input<string>; }