Creating Artifacts via CLI

Create reusable Infrastructure as Code artifacts in Bluebricks to standardize infrastructure and enable consistent deployments across environments.

Overview

This guide covers publishing artifacts using the bricks CLI. Use this approach when Bluebricks cannot access your repository directly, for example with private repos without the GitHub integration, or non-GitHub version control systems.

box-open-full

Supported IaC types

Bluebricks supports multiple IaC technologies:

  • Terraform

  • OpenTofu

  • Helm

  • CloudFormation

  • Bicep

  • Generic (container-based execution)

circle-info

Don't have code that defines your resources yet? Let the Cloud Import Agent codify them for you.

How to publish artifacts via CLI

An artifact is automatically generated through a single CLI command from the code's directory.

Prerequisites

1

For example:

circle-info

Your code must be self-contained and executable with its native tool, such as terraform init/plan/apply or helm install. For Terraform or OpenTofu, this means the root module you would normally navigate into and run directly.

2

Publish with the CLI

Publish it from the artifact directory:

This command generates a slim metadata file (bricks.json) and publishes it into the Bluebricks catalog.

3

View your artifacts

Go to the Artifacts pagearrow-up-right in Bluebricks to see your new artifact.

How to update your artifacts with CLI

Following any change to the underlying IaC you should update your artifact and re-publish it.

1
2

Change the artifacts version

Run the following command to update the semantic version

You can also manually open the bricks.json file of the artifact, change the version and save it.

3

Publish the new version

Publish the new version using

Artifact example

Every artifact is defined by a bricks.json file at its root.

This file describes:

  • The artifact name

  • Semantic version

  • Inputs (props)

  • Outputs (outs)

  • The native IaC implementation (native)

Example:

A standard artifact repository:

Last updated

Was this helpful?