Skip to main content

Reference for the teleport-agent-azure Terraform module

Report an Issue

This page lists the input fields and output values of the teleport-agent-azure Terraform module.

Teleport Agent Deployment on Azure Container Instances​

This module deploys a Teleport Agent Service to Azure Container Instances (ACI).

It is not intended to deploy a Teleport cluster or its Auth Service and Proxy Service control plane. This module does not provision the persistent backend and audit event storage, load balancing, DNS, or TLS certificates required to operate a self-hosted Teleport cluster.

Currently, only the Teleport Kubernetes Service can be deployed.

Prerequisites​

  • An existing Teleport cluster with Auth Service and Proxy Service
  • A reachable Teleport Proxy Service endpoint
  • An existing Azure resource group for the agent resources.
  • A Teleport cluster supporting Generic OIDC joining (v18.11.0 or later), and an agent supporting teleport.join_params.generic_oidc.http_request (v18.11.2 or later).

Examples​

Refer to the examples for example usage of this module.

How to get help​

If you're having trouble, check out our GitHub Discussions.

For bugs related to this code, please open an issue.

Requirements​

NameVersion
terraform>= 1.5.7
azurerm>= 5.0
http>= 3.0
random>= 3.0
teleport>= 18.11.0

Providers​

NameVersion
azurerm>= 5.0
http>= 3.0
random>= 3.0
teleport>= 18.11.0

Modules​

No modules.

Resources​

NameType
azurerm_container_group.teleport_agentresource
azurerm_log_analytics_workspace.thisresource
azurerm_role_assignment.teleport_agentresource
azurerm_role_definition.teleport_agentresource
azurerm_user_assigned_identity.teleport_agentresource
random_string.name_suffixresource
teleport_provision_token.agentresource
azurerm_client_config.thisdata source
http_http.managed_updatesdata source

Inputs​

NameDescriptionTypeDefaultRequired
apply_azure_tagsAdditional Azure tags to apply to all created Azure resources.map(string){}no
container_group_cpuThe required number of CPU cores of the containers.number2no
container_group_desired_countDesired number of Teleport container groups to run.number2no
container_group_memoryThe required memory of the containers in GB.number4no
container_group_nameName for the container group where the agent runs.string"teleport-agent"no
container_group_use_name_prefixDetermines whether var.container_group_name is used as a prefix of the container group name. The revision and replica index are always appended to container group names.booltrueno
createToggle creation of all resources.booltrueno
environment_varsEnvironment variables to set on the Teleport Azure Container Instance.map(string){}no
kubernetes_serviceConfiguration for running this agent as a Kubernetes Service. resource_matcher_labels is required and contains the label selectors to match and proxy Kubernetes resources.object({ enabled = optional(bool, true) resource_matcher_labels = optional(map(list(string)), {}) })n/ayes
locationAzure location for the agent. Example: eastus, westus.stringn/ayes
log_analytics_workspace_nameName of the Log Analytics workspace for the Teleport containers.string"teleport"no
log_analytics_workspace_retention_daysRetention of container logs in the created Log Analytics workspace.number30no
log_analytics_workspace_use_name_prefixDetermines whether log_analytics_workspace_name is used as a prefix of the Log Analytics workspace name.booltrueno
managed_identity_roleCustom role for the agent's managed identity. Defaults to permissions for the configured service, scoped to the provider's subscription. Override actions, data_actions, or scopes as needed; set to null to disable role creation and assignments.object({ actions = optional(list(string)) data_actions = optional(list(string)) scope = optional(string) }){}no
managed_updates_enabledWhether to resolve the Teleport version from the configured Managed Updates endpoint when applying this module.booltrueno
managed_updates_groupUpdate group to query through the v2 Managed Updates endpoint.string"default"no
resource_group_nameResource group where the resources will be created. Must already exist.stringn/ayes
teleport_container_imageContainer image used for Teleport Azure Container Instance tasks.string"public.ecr.aws/gravitational/teleport-ent-distroless"no
teleport_discovery_group_nameIf specified, this is added as part of the resource_matcher_labels, to match the resources discovered in that discovery group.string""no
teleport_proxy_public_addrTeleport cluster proxy public address host:port.stringn/ayes
teleport_version_overrideteleport_version_override is intended for development and MUST NOT be used to control the Teleport version in a typical deployment. This module is designed to run a specific Teleport version. You will face compatibility issues trying to run a different Teleport version with it. If you want to run Teleport version X.Y.Z, you should adjust the module version to X.Y.Z instead.stringnullno

Outputs​

NameDescription
container_group_idsResource IDs of the deployed agents, one per replica.
container_group_namesNames of the deployed agents, one per replica.
container_group_urlsAzure portal URLs for the deployment status and container logs of each deployed agent.
container_logs_follow_commandThe command to follow the logs of the deployed agents' containers.
log_analytics_workspace_idResource ID of the Log Analytics workspace that collects agent logs.
log_analytics_workspace_nameName of the Log Analytics workspace that collects agent logs.
managed_identityThe user-assigned managed identity used by the deployed agents.

Source Code​

View the teleport-agent-azure module source code on GitHub.