blob: e2007bcf39400d10a454e7e20ee6447a5bc20d3b [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Cloud Billing"
description: |-
Billing information for a project.
---
# google\_billing\_project\_info
Billing information for a project.
To get more information about ProjectInfo, see:
* [API documentation](https://cloud.google.com/billing/docs/reference/rest/v1/projects)
* How-to Guides
* [Enable, disable, or change billing for a project](https://cloud.google.com/billing/docs/how-to/modify-project)
## Example Usage - Billing Project Info Basic
```hcl
resource "google_project" "project" {
project_id = "tf-test%{random_suffix}"
name = "tf-test%{random_suffix}"
org_id = "123456789"
lifecycle {
ignore_changes = [billing_account]
}
}
resource "google_billing_project_info" "default" {
project = google_project.project.project_id
billing_account = "000000-0000000-0000000-000000"
}
```
## Argument Reference
The following arguments are supported:
* `billing_account` -
(Required)
The ID of the billing account associated with the project, if
any. Set to empty string to disable billing for the project.
For example, `"012345-567890-ABCDEF"` or `""`.
- - -
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/billingInfo`
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
ProjectInfo can be imported using any of these accepted formats:
* `projects/{{project}}`
* `{{project}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import ProjectInfo using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}"
to = google_billing_project_info.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), ProjectInfo can be imported using one of the formats above. For example:
```
$ terraform import google_billing_project_info.default projects/{{project}}
$ terraform import google_billing_project_info.default {{project}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).