Instruqt Labs (beta)
  • Instruqt
  • Getting started
    • Setting up Version Control
    • Install Instruqt CLI
    • Creating your first lab
    • Configuration basics
    • Exploring the lab configuration
    • Adding your first chapter
    • Configuring sandboxes
    • Adding quizzes
    • Adding tasks and gating content
    • Finishing up
  • Documentation
    • Writing Lab Content
      • Project Structure
      • Markdown and Components
    • Integrations
      • Version Control
    • Lab reference
      • Content
        • Lab
        • Page
        • Activities
          • Task
          • Quiz
            • Multiple Choice
            • Single Choice
            • Text Answer
            • Numeric Answer
        • Layout
        • Tabs
          • Terminal
          • Service
          • Editor
          • External Website
          • Note
      • Sandbox
        • Containers
          • Container
          • Sidecar Container
        • Kubernetes
          • Cluster
          • Config
          • Helm
        • Nomad
          • Cluster
          • Job
        • Networking
          • Network
          • Ingress
        • Cloud Accounts
          • AWS
          • Azure
          • Google Cloud
        • Terraform
        • Template
        • Exec
        • Copy
        • Certificates
          • Root
          • Leaf
        • Random
          • Number
          • ID
          • UUID
          • Password
          • Creature
      • Functions
    • Tools
      • Instruqt CLI
    • Glossary
Powered by GitBook
On this page
  • CertificateLeaf
  • File
Edit on GitHub
Export as PDF
  1. Documentation
  2. Lab reference
  3. Sandbox
  4. Certificates

Leaf

CertificateLeaf

CertificateLeaf generates leaf certificates


resource "certificate_leaf" "name" {
  ...
}

Attributes

Attribute
Description

CAKey ca_key required type: string

Path to the primary key for the root CA

CACert ca_cert required type: string

Path to the root CA

Output output required type: string

Output directory to write the certificate and key to.

IPAddresses ip_addresses type: []string

IP addresses to add to the cert.

DNSNames dns_names type: []string

DNS names to add to the cert.

Cert certificate type: File

The generated certificate.

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.

Attribute
Description

Meta ID meta.id string

The full ID of the resource e.g. `resource.type.name`. This is computed from the full resource path:

Meta Type meta.type string

The type of the resource. This taken from the type label of the resource definition.

Meta Name meta.name string

The name of the resource. This taken from the name label of the resource definition.

PrivateKey private_key type: File

Key is the value related to the certificate key

PublicKeyPEM public_key_pem type: File

The PEM key value of the generated certificate.

PublicKeySSH public_key_ssh type: File

The SSH key value of the generated certificate.


File


file {
  ...
}

Attributes

Attribute
Description

Filename filename type: string

The name of the file.

Directory directory type: string

The directory the file is written to.

Path path type: string

The full path where the file is written to.

Contents contents type: string

The contents of the file.

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.

PreviousRootNextRandom

Last updated 1 month ago

ca_key = resource.certificate_ca.root.private_key.path
ca_cert = resource.certificate_ca.root.certificate.path
output = data("certs")
ip_addresses = ["127.0.0.1"]
dns_names = [
  "localhost",
  "localhost:30090",
  "30090",
  "connector",
  "connector",
]
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting id will be
resource.container.ubuntu
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting type will be
container
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting name will be
ubuntu