Manage Billing Details with Terraform
Your organisation's billing details — the legal name, postal address, country, tax registration and invoice reference printed in the Bill To block of your invoices — can be managed declaratively with the bahriyabillingdetails resource.
Your organisation's billing details — the legal name, postal address, country, tax registration and invoice reference printed in the Bill To block of your invoices — can be managed declaratively with the bahriya_billing_details resource.
Each organisation has exactly one set of billing details, so declare at most one of these resources. Creating it writes your declared identity; destroying it clears every declared field. The billing email is the one exception: it is never cleared, and omitting email leaves the current address unchanged.
Fields
All fields are optional — invoices are issued either way. The computed complete attribute tells you whether the identity is invoice-ready.
| Field | Type | Description |
|---|---|---|
legal_name | string | Registered legal entity name, printed on invoices. Falls back to your organisation display name when unset. |
email | string | The billing email all organisation email goes to. Omitting it leaves the current address unchanged. |
entity_type | string | individual or company. |
address_line1 | string | First line of the postal address. |
address_line2 | string | Second line of the postal address. |
city | string | City. |
state | string | State, province or emirate. |
postcode | string | Postal code — not required everywhere, deliberately optional. |
country | string | ISO 3166-1 alpha-2 country code, e.g. AE or DE. Unrelated to deployment regions. |
tax_id | string | Tax registration number. Requires tax_id_type. |
tax_id_type | string | vat, trn, gst, abn, ein or other — drives the label the invoice prints. |
registration_number | string | Company registration or trade licence number. |
billing_reference | string | A PO number or cost centre printed on invoices. |
Example
resource "bahriya_billing_details" "this" {
entity_type = "company"
legal_name = "Acme Trading LLC"
email = "accounts@acme.example"
address_line1 = "Office 402, Al Majaz Tower"
address_line2 = "Corniche Street"
city = "Sharjah"
state = "Sharjah"
country = "AE"
tax_id = "100123456789003"
tax_id_type = "trn"
registration_number = "1234567"
billing_reference = "PO-4471"
}An individual needs far less:
resource "bahriya_billing_details" "this" {
entity_type = "individual"
address_line1 = "12 Harbour Lane"
city = "Istanbul"
country = "TR"
}Importing existing details
The details are a singleton in the provider's configured organisation. By convention, import with your organisation UUID:
terraform import bahriya_billing_details.this <organisation-uuid>Invoices are snapshots
Each invoice records your billing details as they were on the day it was issued. Applying a change updates future invoices only — already-issued invoices never change.
See also: Billing Details in the console, Reis CLI flag mode, Terraform provider overview.