aiven.BillingGroup
Explore with Pulumi AI
Creates and manages billing groups and assigns them to projects.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const exampleBillingGroup = new aiven.BillingGroup("example_billing_group", {
    name: "example-billing-group",
    billingCurrency: "USD",
    vatId: "123ABC",
    parentId: main.id,
});
const exampleProject = new aiven.Project("example_project", {
    project: "example-project",
    billingGroup: exampleBillingGroup.id,
});
import pulumi
import pulumi_aiven as aiven
example_billing_group = aiven.BillingGroup("example_billing_group",
    name="example-billing-group",
    billing_currency="USD",
    vat_id="123ABC",
    parent_id=main["id"])
example_project = aiven.Project("example_project",
    project="example-project",
    billing_group=example_billing_group.id)
package main
import (
	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleBillingGroup, err := aiven.NewBillingGroup(ctx, "example_billing_group", &aiven.BillingGroupArgs{
			Name:            pulumi.String("example-billing-group"),
			BillingCurrency: pulumi.String("USD"),
			VatId:           pulumi.String("123ABC"),
			ParentId:        pulumi.Any(main.Id),
		})
		if err != nil {
			return err
		}
		_, err = aiven.NewProject(ctx, "example_project", &aiven.ProjectArgs{
			Project:      pulumi.String("example-project"),
			BillingGroup: exampleBillingGroup.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() => 
{
    var exampleBillingGroup = new Aiven.BillingGroup("example_billing_group", new()
    {
        Name = "example-billing-group",
        BillingCurrency = "USD",
        VatId = "123ABC",
        ParentId = main.Id,
    });
    var exampleProject = new Aiven.Project("example_project", new()
    {
        ProjectName = "example-project",
        BillingGroup = exampleBillingGroup.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.BillingGroup;
import com.pulumi.aiven.BillingGroupArgs;
import com.pulumi.aiven.Project;
import com.pulumi.aiven.ProjectArgs;
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 exampleBillingGroup = new BillingGroup("exampleBillingGroup", BillingGroupArgs.builder()
            .name("example-billing-group")
            .billingCurrency("USD")
            .vatId("123ABC")
            .parentId(main.id())
            .build());
        var exampleProject = new Project("exampleProject", ProjectArgs.builder()
            .project("example-project")
            .billingGroup(exampleBillingGroup.id())
            .build());
    }
}
resources:
  exampleBillingGroup:
    type: aiven:BillingGroup
    name: example_billing_group
    properties:
      name: example-billing-group
      billingCurrency: USD
      vatId: 123ABC
      parentId: ${main.id}
  exampleProject:
    type: aiven:Project
    name: example_project
    properties:
      project: example-project
      billingGroup: ${exampleBillingGroup.id}
Create BillingGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BillingGroup(name: string, args?: BillingGroupArgs, opts?: CustomResourceOptions);@overload
def BillingGroup(resource_name: str,
                 args: Optional[BillingGroupArgs] = None,
                 opts: Optional[ResourceOptions] = None)
@overload
def BillingGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 account_id: Optional[str] = None,
                 address_lines: Optional[Sequence[str]] = None,
                 billing_currency: Optional[str] = None,
                 billing_emails: Optional[Sequence[str]] = None,
                 billing_extra_text: Optional[str] = None,
                 card_id: Optional[str] = None,
                 city: Optional[str] = None,
                 company: Optional[str] = None,
                 copy_from_billing_group: Optional[str] = None,
                 country_code: Optional[str] = None,
                 name: Optional[str] = None,
                 parent_id: Optional[str] = None,
                 state: Optional[str] = None,
                 vat_id: Optional[str] = None,
                 zip_code: Optional[str] = None)func NewBillingGroup(ctx *Context, name string, args *BillingGroupArgs, opts ...ResourceOption) (*BillingGroup, error)public BillingGroup(string name, BillingGroupArgs? args = null, CustomResourceOptions? opts = null)
public BillingGroup(String name, BillingGroupArgs args)
public BillingGroup(String name, BillingGroupArgs args, CustomResourceOptions options)
type: aiven:BillingGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BillingGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BillingGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BillingGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BillingGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BillingGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var billingGroupResource = new Aiven.BillingGroup("billingGroupResource", new()
{
    AddressLines = new[]
    {
        "string",
    },
    BillingCurrency = "string",
    BillingEmails = new[]
    {
        "string",
    },
    BillingExtraText = "string",
    CardId = "string",
    City = "string",
    Company = "string",
    CopyFromBillingGroup = "string",
    CountryCode = "string",
    Name = "string",
    ParentId = "string",
    State = "string",
    VatId = "string",
    ZipCode = "string",
});
example, err := aiven.NewBillingGroup(ctx, "billingGroupResource", &aiven.BillingGroupArgs{
	AddressLines: pulumi.StringArray{
		pulumi.String("string"),
	},
	BillingCurrency: pulumi.String("string"),
	BillingEmails: pulumi.StringArray{
		pulumi.String("string"),
	},
	BillingExtraText:     pulumi.String("string"),
	CardId:               pulumi.String("string"),
	City:                 pulumi.String("string"),
	Company:              pulumi.String("string"),
	CopyFromBillingGroup: pulumi.String("string"),
	CountryCode:          pulumi.String("string"),
	Name:                 pulumi.String("string"),
	ParentId:             pulumi.String("string"),
	State:                pulumi.String("string"),
	VatId:                pulumi.String("string"),
	ZipCode:              pulumi.String("string"),
})
var billingGroupResource = new BillingGroup("billingGroupResource", BillingGroupArgs.builder()
    .addressLines("string")
    .billingCurrency("string")
    .billingEmails("string")
    .billingExtraText("string")
    .cardId("string")
    .city("string")
    .company("string")
    .copyFromBillingGroup("string")
    .countryCode("string")
    .name("string")
    .parentId("string")
    .state("string")
    .vatId("string")
    .zipCode("string")
    .build());
billing_group_resource = aiven.BillingGroup("billingGroupResource",
    address_lines=["string"],
    billing_currency="string",
    billing_emails=["string"],
    billing_extra_text="string",
    card_id="string",
    city="string",
    company="string",
    copy_from_billing_group="string",
    country_code="string",
    name="string",
    parent_id="string",
    state="string",
    vat_id="string",
    zip_code="string")
const billingGroupResource = new aiven.BillingGroup("billingGroupResource", {
    addressLines: ["string"],
    billingCurrency: "string",
    billingEmails: ["string"],
    billingExtraText: "string",
    cardId: "string",
    city: "string",
    company: "string",
    copyFromBillingGroup: "string",
    countryCode: "string",
    name: "string",
    parentId: "string",
    state: "string",
    vatId: "string",
    zipCode: "string",
});
type: aiven:BillingGroup
properties:
    addressLines:
        - string
    billingCurrency: string
    billingEmails:
        - string
    billingExtraText: string
    cardId: string
    city: string
    company: string
    copyFromBillingGroup: string
    countryCode: string
    name: string
    parentId: string
    state: string
    vatId: string
    zipCode: string
BillingGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BillingGroup resource accepts the following input properties:
- AccountId string
- Account ID.
- AddressLines List<string>
- Address lines 1 and 2. For example, street, PO box, or building.
- BillingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- BillingEmails List<string>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- BillingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- CardId string
- Credit card ID.
- City string
- City, district, suburb, town, or village.
- Company string
- Your company name.
- CopyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- CountryCode string
- Two-letter country code.
- Name string
- Name of the billing group.
- ParentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- State string
- Address state.
- VatId string
- The VAT identification number for your company.
- ZipCode string
- Zip or postal code.
- AccountId string
- Account ID.
- AddressLines []string
- Address lines 1 and 2. For example, street, PO box, or building.
- BillingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- BillingEmails []string
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- BillingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- CardId string
- Credit card ID.
- City string
- City, district, suburb, town, or village.
- Company string
- Your company name.
- CopyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- CountryCode string
- Two-letter country code.
- Name string
- Name of the billing group.
- ParentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- State string
- Address state.
- VatId string
- The VAT identification number for your company.
- ZipCode string
- Zip or postal code.
- accountId String
- Account ID.
- addressLines List<String>
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency String
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails List<String>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra StringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId String
- Credit card ID.
- city String
- City, district, suburb, town, or village.
- company String
- Your company name.
- copyFrom StringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode String
- Two-letter country code.
- name String
- Name of the billing group.
- parentId String
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state String
- Address state.
- vatId String
- The VAT identification number for your company.
- zipCode String
- Zip or postal code.
- accountId string
- Account ID.
- addressLines string[]
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails string[]
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId string
- Credit card ID.
- city string
- City, district, suburb, town, or village.
- company string
- Your company name.
- copyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode string
- Two-letter country code.
- name string
- Name of the billing group.
- parentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state string
- Address state.
- vatId string
- The VAT identification number for your company.
- zipCode string
- Zip or postal code.
- account_id str
- Account ID.
- address_lines Sequence[str]
- Address lines 1 and 2. For example, street, PO box, or building.
- billing_currency str
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billing_emails Sequence[str]
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billing_extra_ strtext 
- Additional information to include on your invoice (for example, a reference number).
- card_id str
- Credit card ID.
- city str
- City, district, suburb, town, or village.
- company str
- Your company name.
- copy_from_ strbilling_ group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- country_code str
- Two-letter country code.
- name str
- Name of the billing group.
- parent_id str
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state str
- Address state.
- vat_id str
- The VAT identification number for your company.
- zip_code str
- Zip or postal code.
- accountId String
- Account ID.
- addressLines List<String>
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency String
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails List<String>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra StringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId String
- Credit card ID.
- city String
- City, district, suburb, town, or village.
- company String
- Your company name.
- copyFrom StringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode String
- Two-letter country code.
- name String
- Name of the billing group.
- parentId String
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state String
- Address state.
- vatId String
- The VAT identification number for your company.
- zipCode String
- Zip or postal code.
Outputs
All input properties are implicitly available as output properties. Additionally, the BillingGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BillingGroup Resource
Get an existing BillingGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BillingGroupState, opts?: CustomResourceOptions): BillingGroup@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        address_lines: Optional[Sequence[str]] = None,
        billing_currency: Optional[str] = None,
        billing_emails: Optional[Sequence[str]] = None,
        billing_extra_text: Optional[str] = None,
        card_id: Optional[str] = None,
        city: Optional[str] = None,
        company: Optional[str] = None,
        copy_from_billing_group: Optional[str] = None,
        country_code: Optional[str] = None,
        name: Optional[str] = None,
        parent_id: Optional[str] = None,
        state: Optional[str] = None,
        vat_id: Optional[str] = None,
        zip_code: Optional[str] = None) -> BillingGroupfunc GetBillingGroup(ctx *Context, name string, id IDInput, state *BillingGroupState, opts ...ResourceOption) (*BillingGroup, error)public static BillingGroup Get(string name, Input<string> id, BillingGroupState? state, CustomResourceOptions? opts = null)public static BillingGroup get(String name, Output<String> id, BillingGroupState state, CustomResourceOptions options)resources:  _:    type: aiven:BillingGroup    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccountId string
- Account ID.
- AddressLines List<string>
- Address lines 1 and 2. For example, street, PO box, or building.
- BillingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- BillingEmails List<string>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- BillingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- CardId string
- Credit card ID.
- City string
- City, district, suburb, town, or village.
- Company string
- Your company name.
- CopyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- CountryCode string
- Two-letter country code.
- Name string
- Name of the billing group.
- ParentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- State string
- Address state.
- VatId string
- The VAT identification number for your company.
- ZipCode string
- Zip or postal code.
- AccountId string
- Account ID.
- AddressLines []string
- Address lines 1 and 2. For example, street, PO box, or building.
- BillingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- BillingEmails []string
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- BillingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- CardId string
- Credit card ID.
- City string
- City, district, suburb, town, or village.
- Company string
- Your company name.
- CopyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- CountryCode string
- Two-letter country code.
- Name string
- Name of the billing group.
- ParentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- State string
- Address state.
- VatId string
- The VAT identification number for your company.
- ZipCode string
- Zip or postal code.
- accountId String
- Account ID.
- addressLines List<String>
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency String
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails List<String>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra StringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId String
- Credit card ID.
- city String
- City, district, suburb, town, or village.
- company String
- Your company name.
- copyFrom StringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode String
- Two-letter country code.
- name String
- Name of the billing group.
- parentId String
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state String
- Address state.
- vatId String
- The VAT identification number for your company.
- zipCode String
- Zip or postal code.
- accountId string
- Account ID.
- addressLines string[]
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency string
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails string[]
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra stringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId string
- Credit card ID.
- city string
- City, district, suburb, town, or village.
- company string
- Your company name.
- copyFrom stringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode string
- Two-letter country code.
- name string
- Name of the billing group.
- parentId string
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state string
- Address state.
- vatId string
- The VAT identification number for your company.
- zipCode string
- Zip or postal code.
- account_id str
- Account ID.
- address_lines Sequence[str]
- Address lines 1 and 2. For example, street, PO box, or building.
- billing_currency str
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billing_emails Sequence[str]
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billing_extra_ strtext 
- Additional information to include on your invoice (for example, a reference number).
- card_id str
- Credit card ID.
- city str
- City, district, suburb, town, or village.
- company str
- Your company name.
- copy_from_ strbilling_ group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- country_code str
- Two-letter country code.
- name str
- Name of the billing group.
- parent_id str
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state str
- Address state.
- vat_id str
- The VAT identification number for your company.
- zip_code str
- Zip or postal code.
- accountId String
- Account ID.
- addressLines List<String>
- Address lines 1 and 2. For example, street, PO box, or building.
- billingCurrency String
- Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- billingEmails List<String>
- Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- billingExtra StringText 
- Additional information to include on your invoice (for example, a reference number).
- cardId String
- Credit card ID.
- city String
- City, district, suburb, town, or village.
- company String
- Your company name.
- copyFrom StringBilling Group 
- ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- countryCode String
- Two-letter country code.
- name String
- Name of the billing group.
- parentId String
- Link a billing group to an existing organization by using its ID. To set up proper dependencies please refer to this variable as a reference.
- state String
- Address state.
- vatId String
- The VAT identification number for your company.
- zipCode String
- Zip or postal code.
Import
$ pulumi import aiven:index/billingGroup:BillingGroup example_billing_group ID
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the aivenTerraform Provider.