google_billing_subaccount

Allows creation and management of a Google Cloud Billing Subaccount.

resource "google_billing_subaccount" "subaccount" {
    display_name = "My Billing Account"
    master_billing_account = "012345-567890-ABCDEF"
}

Argument Reference

Attributes Reference

The following additional attributes are exported:

Import

Billing Subaccounts can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Billing Subaccounts using one of the formats above. For example:

import {
  id = "billingAccounts/{billing_account_id}"
  to = google_billing_subaccount.default
}

When using the terraform import command, Billing Subaccounts can be imported using one of the formats above. For example:

$ terraform import google_billing_subaccount.default billingAccounts/{billing_account_id}