layout | page_title | sidebar_current | description |
---|---|---|---|
default |
CloudStack: cloudstack_account |
docs-cloudstack-resource-account |
Creates a Account |
A cloudstack_account
resource manages an account within CloudStack.
resource "cloudstack_account" "example" {
email = "[email protected]"
first_name = "John"
last_name = "Doe"
password = "securepassword"
username = "jdoe"
account_type = 1 # 1 for admin, 2 for domain admin, 0 for regular user
role_id = "1234abcd" # ID of the role associated with the account
}
The following arguments are supported:
email
- (Required) The email address of the account owner.first_name
- (Required) The first name of the account owner.last_name
- (Required) The last name of the account owner.password
- (Required) The password for the account.username
- (Required) The username of the account.account_type
- (Required) The account type. Possible values are0
for regular user,1
for admin, and2
for domain admin.role_id
- (Required) The ID of the role associated with the account.account
- (Optional) The account name. If not specified, the username will be used as the account name.domainid
- (Optional) Creates the user under the specified domain
The following attributes are exported:
id
- The ID of the account.
Accounts can be imported; use <ACCOUNTID>
as the import ID. For example:
$ terraform import cloudstack_account.example <ACCOUNTID>