Skip to main content
Components encapsulate multiple resources into a single reusable unit. They are referenced with the component block and published to the Strata registry.

Using a Registry Component

component "platform" {
  source     = "registry.ubiquex.io/eks-platform"
  version    = "2.1.0"
  region     = "eu-west-1"
  node_count = 3
}

output "cluster_endpoint" {
  value = ~component.platform.cluster_endpoint
}

Using a Local Component

component "vpc" {
  source = "./components/vpc"
  cidr   = "10.0.0.0/16"
  region = input.region
}

Component Source Formats

FormatExample
Short nameeks-platformregistry.ubiquex.io/eks-platform
Full registry URLregistry.ubiquex.io/eks-platform
Local path./components/vpc

Under the Hood

Registry components are TypeScript Pulumi ComponentResources packaged as npm packages:
// Generated TypeScript
import { EksPlatform } from "@ubiquex/eks-platform";

const platform = new EksPlatform("platform", {
    region: "eu-west-1",
    nodeCount: 3,
});

Publishing Components

ubx publish                         # publish current directory
ubx publish --version 2.1.0
See ubx publish for details.

Native .iac Components (Planned)

A future version of ubx will support writing components in .iac syntax:
# components/vpc/main.iac
input "cidr" { type = "string" }

unit "aws_vpc" "main" {
  cidr_block = input.cidr
}

output "vpc_id" {
  value = ~unit.aws_vpc.main.id
}
This eliminates the need for TypeScript knowledge to write reusable components.