Google Cloud Platform Billing Subaccount
This page shows how to write Terraform for Cloud Platform Billing Subaccount and write them securely.
google_billing_subaccount (Terraform)
The Billing Subaccount in Cloud Platform can be configured in Terraform with the resource name google_billing_subaccount
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
billing_account_id
optional computed - string -
deletion_policy
optional - string -
display_name
required - string -
id
optional computed - string -
master_billing_account
required - string -
name
optional computed - string -
open
optional computed - bool
Explanation in Terraform Registry
Allows creation and management of a Google Cloud Billing Subaccount. !> WARNING: Deleting this Terraform resource will not delete or close the billing subaccount.
resource "google_billing_subaccount" "subaccount" { display_name = "My Billing Account" master_billing_account = "012345-567890-ABCDEF" }
Tips: Best Practices for The Other Google Cloud Platform Resources
In addition to the google_project, Google Cloud Platform has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
google_project
Ensure project-level default network creation is disabled
It is better to disable the auto-creation of default networks. The default network for a GCP project is usually configured coarsely, leaving the risk of unwanted access to resources in the network.