Skip to content

googleBillingAccount

Use this data source to get information about a Google Billing Account.

/*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.*/
const dataGoogleBillingAccountAcct =
  new google.dataGoogleBillingAccount.DataGoogleBillingAccount(this, "acct", {
    display_name: "My Billing Account",
    open: true,
  });
new google.project.Project(this, "my_project", {
  billing_account: dataGoogleBillingAccountAcct.id,
  name: "My Project",
  org_id: "1234567",
  project_id: "your-project-id",
});

Argument Reference

The arguments of this data source act as filters for querying the available billing accounts. The given filters must match exactly one billing account whose data will be exported as attributes. The following arguments are supported:

  • billingAccount (Optional) - The name of the billing account in the form {billingAccountId} or billingAccounts/{billingAccountId}.
  • displayName (Optional) - The display name of the billing account.
  • open (Optional) - true if the billing account is open, false if the billing account is closed.

\~> NOTE: One of billingAccount or displayName must be specified.

Attributes Reference

The following additional attributes are exported:

  • id - The billing account ID.
  • name - The resource name of the billing account in the form billingAccounts/{billingAccountId}.
  • projectIds - The IDs of any projects associated with the billing account.