Skip to content

googleProjectUsageExportBucket

Sets up a usage export bucket for a particular project. A usage export bucket is a pre-configured GCS bucket which is set up to receive daily and monthly reports of the GCE resources used.

For more information see the Docs and for further details, the API Documentation.

\~> Note: You should specify only one of these per project. If there are two or more they will fight over which bucket the reports should be stored in. It is safe to have multiple resources with the same backing bucket.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.projectUsageExportBucket.ProjectUsageExportBucket(
  this,
  "usage_export",
  {
    bucket_name: "usage-tracking-bucket",
    project: "development-project",
  }
);

Argument Reference

  • bucketName: (Required) The bucket to store reports in.

  • prefix: (Optional) A prefix for the reports, for instance, the project name.

  • project: (Optional) The project to set the export bucket on. If it is not provided, the provider project is used.

Timeouts

This resource provides the following Timeouts configuration options: configuration options:

  • create - Default is 4 minutes.
  • delete - Default is 4 minutes.

Import

A project's Usage Export Bucket can be imported using this format:

$ terraform import google_project_usage_export_bucket.usage_export {{project}}