Skip to main content

Reference for the teleport_crown_jewel Terraform resource

Report an Issue

This page lists the supported values of the teleport_crown_jewel resource of the Teleport Terraform provider.

Example Usage

resource "teleport_crown_jewel" "example" {
  version = "v1"
  metadata = {
    name        = "example"
    description = "Example crown jewel"
    labels = {
      foo = "bar"
    }
  }
  spec = {
    query = "resource.kind == \"node\""
    teleport_matchers = [{
      kinds = ["node"]
      names = ["my-node"]
      labels = [{
        name   = "env"
        values = ["prod"]
      }]
    }]
    aws_matchers = [{
      types   = ["ec2"]
      regions = ["us-east-1"]
      tags = [{
        key    = "env"
        values = ["prod"]
      }]
    }]
  }
}

Schema

Required

  • spec (Attributes) Spec is the crown jewel spec. (see below for nested schema)
  • version (String) The version of the resource being represented.

Optional

  • metadata (Attributes) Common metadata that all resources share. (see below for nested schema)
  • sub_kind (String) Mandatory field for all resources. Not populated for this resource type.

Nested Schema for spec

Optional:

  • aws_matchers (Attributes List) AWSMatchers is a list of AWS matchers. DEPRECATED: Use query instead. (see below for nested schema)
  • query (String) Query is a Access Graph query to match resources.
  • teleport_matchers (Attributes List) TeleportMatchers is a list of teleport matchers. DEPRECATED: Use query instead. (see below for nested schema)

Nested Schema for spec.aws_matchers

Optional:

  • arns (List of String) ARNs are AWS resources ARN to match.
  • regions (List of String) Regions are AWS regions to query for resources.
  • tags (Attributes List) Tags are AWS resource Tags to match. labels is a set of labels. (see below for nested schema)
  • types (List of String) Types are AWS database types to match, "ec2", "rds", "s3", etc

Nested Schema for spec.aws_matchers.tags

Optional:

  • key (String) Key is the key of the tag.
  • values (List of String) Value is the value of the tag.

Nested Schema for spec.teleport_matchers

Optional:

  • kinds (List of String) Kind is the kind of the resource: ssh, k8s, db, etc Multiple kinds can be provided to match multiple kinds.
  • labels (Attributes List) Labels is a set of labels. (see below for nested schema)
  • names (List of String) Names are the name of resources. When the name is provided, it will match resources with the same name.

Nested Schema for spec.teleport_matchers.labels

Optional:

  • name (String) The name of the label.
  • values (List of String) The values associated with the label.

Nested Schema for metadata

Required:

  • name (String) name is an object name.

Optional:

  • description (String) description is object description.
  • expires (String) expires is a global expiry time header can be set on any resource in the system.
  • labels (Map of String) labels is a set of labels.