Sub Account
Allows creation and management of a Google Cloud Billing Subaccount. !>WARNING: Deleting this resource will not delete or close the billing subaccount.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const subaccount = new gcp.billing.SubAccount("subaccount", {
displayName: "My Billing Account",
masterBillingAccount: "012345-567890-ABCDEF",
});
import pulumi
import pulumi_gcp as gcp
subaccount = gcp.billing.SubAccount("subaccount",
display_name="My Billing Account",
master_billing_account="012345-567890-ABCDEF")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var subaccount = new Gcp.Billing.SubAccount("subaccount", new()
{
DisplayName = "My Billing Account",
MasterBillingAccount = "012345-567890-ABCDEF",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/billing"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := billing.NewSubAccount(ctx, "subaccount", &billing.SubAccountArgs{
DisplayName: pulumi.String("My Billing Account"),
MasterBillingAccount: pulumi.String("012345-567890-ABCDEF"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.billing.SubAccount;
import com.pulumi.gcp.billing.SubAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var subaccount = new SubAccount("subaccount", SubAccountArgs.builder()
.displayName("My Billing Account")
.masterBillingAccount("012345-567890-ABCDEF")
.build());
}
}
resources:
subaccount:
type: gcp:billing:SubAccount
properties:
displayName: My Billing Account
masterBillingAccount: 012345-567890-ABCDEF
Import
Billing Subaccounts can be imported using any of these accepted formats:
billingAccounts/{billing_account_id}
When using thepulumi import
command, Billing Subaccounts can be imported using one of the formats above. For example:
$ pulumi import gcp:billing/subAccount:SubAccount default billingAccounts/{billing_account_id}
Properties
The billing account id.
If set to "RENAME_ON_DESTROY" the billing account display_name will be changed to "Destroyed" along with a timestamp. If set to "" this will not occur. Default is "".
The display name of the billing account.
The name of the master billing account that the subaccount will be created under in the form {billing_account_id}
or billingAccounts/{billing_account_id}
.