streamtime_api_key (Resource)
An API key for scripts and automation. Streamtime shows the key value only when it creates the key, so it is kept in the Terraform state, marked sensitive.
Example Usage
resource "streamtime_api_key" "ci" {
name = "ci-pipeline"
role = "Agent"
}
# Streamtime shows the key value only when it creates the key.
output "ci_api_key" {
value = streamtime_api_key.ci.key
sensitive = true
}
Schema
Required
name(String) A name that tells you what the key is for. Up to 50 characters.role(String) The role the key acts with, for example Agent or Administrator. A name and role pair can be used only once.
Read-Only
id(String) ID of the API key. Use it to import an existing key.key(String, Sensitive) The key value. Streamtime returns it only when the key is created, so it is empty for a key you imported. Create a new key if you need the value of an imported one.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by the API key's ID. The key value is not returned for an imported key.
terraform import streamtime_api_key.ci 6f1c2d3e-0000-4000-8000-000000000000