continueops_runner_licence (Resource)
A licence that runners enrol with. Give licence_key to the runner installer.
~> Destroying or replacing this resource REVOKES the licence and unregisters every runner enrolled with it. Those runners stop taking work at once and must be re-enrolled with a new licence. Changing max_deployments, single_use or valid_hours replaces the licence, so it revokes it too. Protect a licence that live runners use:
lifecycle {
prevent_destroy = true
}licence_key is only returned when the licence is issued: after terraform import it is null, because the platform never shows it again. On import valid_hours is worked out from not_after - issued_at (0 when the licence never expires).
Example Usage
# Destroying or replacing a licence revokes it and unregisters every runner
# enrolled with it, so guard it.
resource "continueops_runner_licence" "aws_prod" {
label = "aws-prod runners"
max_deployments = 3
lifecycle {
prevent_destroy = true
}
}
output "runner_licence_key" {
value = continueops_runner_licence.aws_prod.licence_key
sensitive = true
}Schema
Optional
label(String) Human label, up to 200 characters. The only attribute that changes in place.max_deployments(Number) How many runners may be enrolled with this licence at once, 1-10000. Default5. Changing it replaces (revokes) the licence.single_use(Boolean) The licence is consumed by the first enrolment. Needsmax_deployments = 1. Defaultfalse. Changing it replaces (revokes) the licence.timeouts(Attributes) (see below for nested schema)valid_hours(Number) Hours from issue after which no new runner can enrol, 0-87600;0(the default) never expires. The platform stores the resultingnot_after, not this number. Changing it replaces (revokes) the licence.
Read-Only
consumed_at(String) When asingle_uselicence was consumed by its enrolment (RFC 3339, UTC); null until then.deployment_count(Number) How many runners are currently enrolled with this licence. Changes as runners enrol; never causes a plan diff.id(String) Licence id (UUID).issued_at(String) When the licence was issued (RFC 3339, UTC).licence_key(String, Sensitive) The secret key runners enrol with (cops-lic-...). Returned only when the licence is issued; null after import.not_after(String) When the licence stops accepting enrolments (RFC 3339, UTC); null if it never expires.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.read(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
import {
to = continueops_runner_licence.example
id = "00000000-0000-4000-8000-000000000000"
}The terraform import command can be used, for example:
# Import by id (UUID), shown in the ContinueOps UI and returned by the API.
terraform import continueops_runner_licence.example 00000000-0000-4000-8000-000000000000
# licence_key is only returned when the licence is created, so it is null after import.