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
module"launchdarkly_access_token" {
source="./modules/launchdarkly/r/launchdarkly_access_token"# custom_roles - (optional) is a type of set of stringcustom_roles=[]
# default_api_version - (optional) is a type of numberdefault_api_version=null# expire - (optional) is a type of numberexpire=null# name - (required) is a type of stringname=null# role - (optional) is a type of stringrole=null# service_token - (optional) is a type of boolservice_token=nullpolicy_statements=[{
actions = []
effect =null
not_actions = []
not_resources = []
resources = []
}]
}
variable"custom_roles" {
description="(optional) - A set of custom role keys to use as access limits for the access token"type=set(string)
default=null
}
variable"default_api_version" {
description="(optional) - The default API version for this token. Defaults to the latest API version."type=numberdefault=null
}
variable"expire" {
description="(optional) - Replace the computed token secret with a new value. The expired secret will no longer be able to authorize usage of the LaunchDarkly API. Should be an expiration time for the current token secret, expressed as a Unix epoch time in milliseconds. Setting this to a negative value will expire the existing token immediately. To reset the token value again, change 'expire' to a new value. Setting this field at resource creation time WILL NOT set an expiration time for the token."type=numberdefault=null
}
variable"name" {
description="(required) - The human-readable name of the access token"type=string
}
variable"role" {
description="(optional) - The name of a built-in role for the token"type=stringdefault=null
}
variable"service_token" {
description="(optional) - Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens"type=booldefault=null
}
variable"policy_statements" {
description="nested block: NestingList, min items: 0, max items: 0"type=set(object(
{
actions =list(string)
effect =string
not_actions =list(string)
not_resources =list(string)
resources =list(string)
}
))
default=[]
}
resource"launchdarkly_access_token""this" {
# custom_roles - (optional) is a type of set of stringcustom_roles=var.custom_roles# default_api_version - (optional) is a type of numberdefault_api_version=var.default_api_version# expire - (optional) is a type of numberexpire=var.expire# name - (required) is a type of stringname=var.name# role - (optional) is a type of stringrole=var.role# service_token - (optional) is a type of boolservice_token=var.service_tokendynamic"policy_statements" {
for_each=var.policy_statementscontent {
# actions - (optional) is a type of list of stringactions=policy_statements.value["actions"]
# effect - (required) is a type of stringeffect=policy_statements.value["effect"]
# not_actions - (optional) is a type of list of stringnot_actions=policy_statements.value["not_actions"]
# not_resources - (optional) is a type of list of stringnot_resources=policy_statements.value["not_resources"]
# resources - (optional) is a type of list of stringresources=policy_statements.value["resources"]
}
}
}