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.

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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.

risk-label

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.

Review your Google Cloud Platform settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

Frequently asked questions

What is Google Cloud Platform Billing Subaccount?

Google Cloud Platform Billing Subaccount is a resource for Cloud Platform of Google Cloud Platform. Settings can be wrote in Terraform.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.