kosli_service_account_api_key resource.
Service accounts cannot be created in personal organizations. Only organization admins or the user who created the service account can manage it.
kosli_service_account_api_key resource. To look up an existing service account’s metadata, use the kosli_service_account data source.
Example usage
Privileges
Theprivilege attribute must be one of the following:
admin— Full administrative accessmember— Standard read/write accesssnapshotter— May report environment snapshotsreader— Read-only access
Import
Service accounts can be imported using their name:Managing API keys
To mint API keys for a service account, use thekosli_service_account_api_key resource. To look up an existing service account’s metadata, use the kosli_service_account data source.
Schema
Required
name(String) Name of the service account. Must be unique within the organization, contain only alphanumeric characters and hyphens (^[a-zA-Z0-9\-]+$), and be at most 64 characters. Changing this will force recreation of the resource.privilege(String) Privilege (role) granted to the service account within the organization. Valid values:admin,member,snapshotter,reader. You can only create a service account with a privilege equal to or lower than your own.
Optional
description(String) Free-form description of the service account.
Read-only
created_at(String) RFC3339 UTC timestamp of when the service account was created.creating_user_id(String) Identifier of the user who created the service account.display_name(String) Display name of the service account, assigned by the server.for_webhook(Boolean) Whether the service account was created for webhook usage.