You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add option to create a subaccount API token and have it available as an output when creating a sub account so we can reference later in other terraform apply as provider api token to make terraform changes on sub account such as the logzio_archive_logs on sub Acount
This property should also have the option to give the API token a name.
Currently we do this by calling curl to the Logzio API directly
resource "shell_script" "create_subaccount_api" {
depends_on = [
logzio_subaccount.subaccount
]
To add option to create a subaccount API token and have it available as an output when creating a sub account so we can reference later in other terraform apply as provider api token to make terraform changes on sub account such as the logzio_archive_logs on sub Acount
This property should also have the option to give the API token a name.
Currently we do this by calling curl to the Logzio API directly
resource "shell_script" "create_subaccount_api" {
depends_on = [
logzio_subaccount.subaccount
]
lifecycle_commands {
create = <<SCRIPT
curl -X POST "${var.logzio_api_uri}/v1/api-tokens/sub-account" -H "accept: application/json" -H "content-type: application/json" -H "X-API-TOKEN: ${var.master_api_token}" -d "{ "name": "Default API Token", "accountId":${logzio_subaccount.subaccount.account_id}}"
SCRIPT
}
}
The text was updated successfully, but these errors were encountered: