@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
427 lines • 20.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* IcebergCatalogs are top-level containers for Apache Iceberg REST Catalog served Namespaces and Tables.
*
* To get more information about IcebergCatalog, see:
* * How-to Guides
* * [Use the BigLake metastore Iceberg REST catalog](https://docs.cloud.google.com/biglake/docs/blms-rest-catalog)
*
* > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource's IAM,
* you must specify a `billingProject` and set `userProjectOverride` to true
* in the provider configuration. Otherwise the IAM API will return 403s.
* Your account must have the `serviceusage.services.use` permission on the
* `billingProject` you defined.
*
* ## Example Usage
*
* ### Biglake Iceberg Catalog
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const bucketForMyIcebergCatalog = new gcp.storage.Bucket("bucket_for_my_iceberg_catalog", {
* name: "my_iceberg_catalog",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
* name: bucketForMyIcebergCatalog.name,
* catalogType: "CATALOG_TYPE_GCS_BUCKET",
* credentialMode: "CREDENTIAL_MODE_VENDED_CREDENTIALS",
* }, {
* dependsOn: [bucketForMyIcebergCatalog],
* });
* ```
* ### Biglake Iceberg Catalog Primary Location
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const bucketForMyIcebergCatalog = new gcp.storage.Bucket("bucket_for_my_iceberg_catalog", {
* name: "my_iceberg_catalog",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
* name: bucketForMyIcebergCatalog.name,
* catalogType: "CATALOG_TYPE_GCS_BUCKET",
* credentialMode: "CREDENTIAL_MODE_VENDED_CREDENTIALS",
* primaryLocation: "us-central1",
* }, {
* dependsOn: [bucketForMyIcebergCatalog],
* });
* ```
* ### Biglake Iceberg Catalog Biglake
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const defaultBucket = new gcp.storage.Bucket("default_bucket", {
* name: "my_iceberg_catalog-default",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const restrictedBucket = new gcp.storage.Bucket("restricted_bucket", {
* name: "my_iceberg_catalog-restricted",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
* name: "my_iceberg_catalog",
* catalogType: "CATALOG_TYPE_BIGLAKE",
* credentialMode: "CREDENTIAL_MODE_VENDED_CREDENTIALS",
* defaultLocation: pulumi.interpolate`gs://${defaultBucket.name}`,
* restrictedLocationsConfig: {
* restrictedLocations: [
* pulumi.interpolate`gs://${defaultBucket.name}`,
* pulumi.interpolate`gs://${restrictedBucket.name}`,
* ],
* },
* });
* ```
* ### Biglake Iceberg Catalog Federated Unity
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
* catalogType: "CATALOG_TYPE_FEDERATED",
* name: "my_iceberg_catalog",
* primaryLocation: "us-central1",
* federatedCatalogOptions: {
* unityCatalogInfo: {
* catalogName: "my_catalog",
* instanceName: "1.1.gcp.databricks.com",
* servicePrincipalApplicationId: "b3204274-6556-4d40-ad18-556f91659745",
* },
* refreshOptions: {
* refreshSchedule: {
* refreshInterval: "300s",
* },
* },
* },
* });
* ```
* ### Biglake Iceberg Catalog Federated Glue
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myIcebergCatalog = new gcp.biglake.IcebergCatalog("my_iceberg_catalog", {
* catalogType: "CATALOG_TYPE_FEDERATED",
* name: "my_iceberg_catalog",
* primaryLocation: "us-central1",
* federatedCatalogOptions: {
* glueCatalogInfo: {
* awsRegion: "us-east-1",
* awsRoleArn: "arn:aws:iam::111222333444:role/my-glue-role",
* warehouse: "111222333444:s3tablescatalog/example",
* },
* refreshOptions: {
* refreshSchedule: {
* refreshInterval: "300s",
* },
* },
* },
* });
* ```
*
* ## Import
*
* IcebergCatalog can be imported using any of these accepted formats:
*
* * `iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
*
* When using the `pulumi import` command, IcebergCatalog can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}
* $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default {{project}}/{{name}}
* $ pulumi import gcp:biglake/icebergCatalog:IcebergCatalog default {{name}}
* ```
*/
export declare class IcebergCatalog extends pulumi.CustomResource {
/**
* Get an existing IcebergCatalog 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?: IcebergCatalogState, opts?: pulumi.CustomResourceOptions): IcebergCatalog;
/**
* Returns true if the given object is an instance of IcebergCatalog. 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 IcebergCatalog;
/**
* Output only. The service account used for credential vending. It might be empty if credential vending was never enabled for the catalog.
*/
readonly biglakeServiceAccount: pulumi.Output<string>;
/**
* Output only. The unique ID of the service account used for credential vending. Used for federation scenarios.
*/
readonly biglakeServiceAccountId: pulumi.Output<string>;
/**
* The catalog type of the IcebergCatalog.
* * `CATALOG_TYPE_GCS_BUCKET`: Google Cloud Storage bucket catalog type.
* * `CATALOG_TYPE_BIGLAKE`: BigLake catalog type.
* * `CATALOG_TYPE_FEDERATED`: Federated catalog type, for integrating with external Iceberg REST Catalogs such as Databricks Unity Catalog or AWS Glue.
* Possible values are: `CATALOG_TYPE_GCS_BUCKET`, `CATALOG_TYPE_BIGLAKE`, `CATALOG_TYPE_FEDERATED`.
*/
readonly catalogType: pulumi.Output<string>;
/**
* Output only. The creation time of the IcebergCatalog.
*/
readonly createTime: pulumi.Output<string>;
/**
* The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require `X-Iceberg-Access-Delegation` header with `vended-credentials` value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions.
* Possible values are: `CREDENTIAL_MODE_END_USER`, `CREDENTIAL_MODE_VENDED_CREDENTIALS`.
*/
readonly credentialMode: pulumi.Output<string>;
/**
* The default storage location for the catalog, e.g., `gs://my-bucket`.
* Output only when the catalog type is CATALOG_TYPE_GCS_BUCKET.
* Required when the catalog type is CATALOG_TYPE_BIGLAKE.
*/
readonly defaultLocation: 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>;
/**
* A user-provided description of the catalog. Maximum 1024 UTF-8 characters.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Options for a CATALOG_TYPE_FEDERATED catalog. Required when catalogType
* is CATALOG_TYPE_FEDERATED.
* Structure is documented below.
*/
readonly federatedCatalogOptions: pulumi.Output<outputs.biglake.IcebergCatalogFederatedCatalogOptions | undefined>;
/**
* The name of the IcebergCatalog.
* For CATALOG_TYPE_GCS_BUCKET typed catalogs, the name needs to be the
* exact same value of the GCS bucket's name. For example, for a bucket:
* gs://bucket-name, the catalog name will be exactly "bucket-name".
*/
readonly name: pulumi.Output<string>;
/**
* The primary location for mirroring the remote catalog metadata. It must be
* a BigLake-supported location, and it should be proximate to the remote
* catalog's location.
*/
readonly primaryLocation: pulumi.Output<string | undefined>;
/**
* 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>;
/**
* Output only. The replicas for the catalog metadata.
* Structure is documented below.
*/
readonly replicas: pulumi.Output<outputs.biglake.IcebergCatalogReplica[]>;
/**
* Configuration for the additional GCS locations that are permitted for use
* by resources within this catalog.
* Structure is documented below.
*/
readonly restrictedLocationsConfig: pulumi.Output<outputs.biglake.IcebergCatalogRestrictedLocationsConfig>;
/**
* Output only. The GCP region(s) where the physical metadata for the tables is stored, e.g. `us-central1`, `nam4` or `us`. This will contain one value for all locations, except for the catalogs that are configured to use custom dual region buckets.
*/
readonly storageRegions: pulumi.Output<string[]>;
/**
* Output only. The last modification time of the IcebergCatalog.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a IcebergCatalog 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: IcebergCatalogArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering IcebergCatalog resources.
*/
export interface IcebergCatalogState {
/**
* Output only. The service account used for credential vending. It might be empty if credential vending was never enabled for the catalog.
*/
biglakeServiceAccount?: pulumi.Input<string | undefined>;
/**
* Output only. The unique ID of the service account used for credential vending. Used for federation scenarios.
*/
biglakeServiceAccountId?: pulumi.Input<string | undefined>;
/**
* The catalog type of the IcebergCatalog.
* * `CATALOG_TYPE_GCS_BUCKET`: Google Cloud Storage bucket catalog type.
* * `CATALOG_TYPE_BIGLAKE`: BigLake catalog type.
* * `CATALOG_TYPE_FEDERATED`: Federated catalog type, for integrating with external Iceberg REST Catalogs such as Databricks Unity Catalog or AWS Glue.
* Possible values are: `CATALOG_TYPE_GCS_BUCKET`, `CATALOG_TYPE_BIGLAKE`, `CATALOG_TYPE_FEDERATED`.
*/
catalogType?: pulumi.Input<string | undefined>;
/**
* Output only. The creation time of the IcebergCatalog.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require `X-Iceberg-Access-Delegation` header with `vended-credentials` value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions.
* Possible values are: `CREDENTIAL_MODE_END_USER`, `CREDENTIAL_MODE_VENDED_CREDENTIALS`.
*/
credentialMode?: pulumi.Input<string | undefined>;
/**
* The default storage location for the catalog, e.g., `gs://my-bucket`.
* Output only when the catalog type is CATALOG_TYPE_GCS_BUCKET.
* Required when the catalog type is CATALOG_TYPE_BIGLAKE.
*/
defaultLocation?: 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>;
/**
* A user-provided description of the catalog. Maximum 1024 UTF-8 characters.
*/
description?: pulumi.Input<string | undefined>;
/**
* Options for a CATALOG_TYPE_FEDERATED catalog. Required when catalogType
* is CATALOG_TYPE_FEDERATED.
* Structure is documented below.
*/
federatedCatalogOptions?: pulumi.Input<inputs.biglake.IcebergCatalogFederatedCatalogOptions | undefined>;
/**
* The name of the IcebergCatalog.
* For CATALOG_TYPE_GCS_BUCKET typed catalogs, the name needs to be the
* exact same value of the GCS bucket's name. For example, for a bucket:
* gs://bucket-name, the catalog name will be exactly "bucket-name".
*/
name?: pulumi.Input<string | undefined>;
/**
* The primary location for mirroring the remote catalog metadata. It must be
* a BigLake-supported location, and it should be proximate to the remote
* catalog's location.
*/
primaryLocation?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Output only. The replicas for the catalog metadata.
* Structure is documented below.
*/
replicas?: pulumi.Input<pulumi.Input<inputs.biglake.IcebergCatalogReplica>[] | undefined>;
/**
* Configuration for the additional GCS locations that are permitted for use
* by resources within this catalog.
* Structure is documented below.
*/
restrictedLocationsConfig?: pulumi.Input<inputs.biglake.IcebergCatalogRestrictedLocationsConfig | undefined>;
/**
* Output only. The GCP region(s) where the physical metadata for the tables is stored, e.g. `us-central1`, `nam4` or `us`. This will contain one value for all locations, except for the catalogs that are configured to use custom dual region buckets.
*/
storageRegions?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Output only. The last modification time of the IcebergCatalog.
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a IcebergCatalog resource.
*/
export interface IcebergCatalogArgs {
/**
* The catalog type of the IcebergCatalog.
* * `CATALOG_TYPE_GCS_BUCKET`: Google Cloud Storage bucket catalog type.
* * `CATALOG_TYPE_BIGLAKE`: BigLake catalog type.
* * `CATALOG_TYPE_FEDERATED`: Federated catalog type, for integrating with external Iceberg REST Catalogs such as Databricks Unity Catalog or AWS Glue.
* Possible values are: `CATALOG_TYPE_GCS_BUCKET`, `CATALOG_TYPE_BIGLAKE`, `CATALOG_TYPE_FEDERATED`.
*/
catalogType: pulumi.Input<string>;
/**
* The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require `X-Iceberg-Access-Delegation` header with `vended-credentials` value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions.
* Possible values are: `CREDENTIAL_MODE_END_USER`, `CREDENTIAL_MODE_VENDED_CREDENTIALS`.
*/
credentialMode?: pulumi.Input<string | undefined>;
/**
* The default storage location for the catalog, e.g., `gs://my-bucket`.
* Output only when the catalog type is CATALOG_TYPE_GCS_BUCKET.
* Required when the catalog type is CATALOG_TYPE_BIGLAKE.
*/
defaultLocation?: 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>;
/**
* A user-provided description of the catalog. Maximum 1024 UTF-8 characters.
*/
description?: pulumi.Input<string | undefined>;
/**
* Options for a CATALOG_TYPE_FEDERATED catalog. Required when catalogType
* is CATALOG_TYPE_FEDERATED.
* Structure is documented below.
*/
federatedCatalogOptions?: pulumi.Input<inputs.biglake.IcebergCatalogFederatedCatalogOptions | undefined>;
/**
* The name of the IcebergCatalog.
* For CATALOG_TYPE_GCS_BUCKET typed catalogs, the name needs to be the
* exact same value of the GCS bucket's name. For example, for a bucket:
* gs://bucket-name, the catalog name will be exactly "bucket-name".
*/
name?: pulumi.Input<string | undefined>;
/**
* The primary location for mirroring the remote catalog metadata. It must be
* a BigLake-supported location, and it should be proximate to the remote
* catalog's location.
*/
primaryLocation?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Configuration for the additional GCS locations that are permitted for use
* by resources within this catalog.
* Structure is documented below.
*/
restrictedLocationsConfig?: pulumi.Input<inputs.biglake.IcebergCatalogRestrictedLocationsConfig | undefined>;
}
//# sourceMappingURL=icebergCatalog.d.ts.map