0.10.0 • Published 7 months ago

@globallogicuki/backstage-plugin-terraform v0.10.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

Terraform Frontend Plugin for Backstage

You can use this plugin to display a list of terraform runs for one or more workspaces.

Terraform Runs - Single Workspace

Terraform Runs - Multiple Workspaces

Install

yarn add @globallogicuki/backstage-plugin-terraform

Setup

This plugin is designed to work in its own tab within an entity. You will need to add the <EntityTerraformContent /> component to the entity page in the frontend app.

There is a isTerraformAvailable helper function and a <EntityTerraformCard /> component available should you wish to use this within an existing tab.

Edit the packages/app/src/components/catalog/EntityPage.tsx and add the imports:

import { EntityTerraformContent } from '@globallogicuki/backstage-plugin-terraform';

Then add the following route and component to the desired entity page:

<EntityLayout.Route path="/terraform" title="Terraform">
  <EntityTerraformContent />
</EntityLayout.Route>

There are two annotations that you should add to your catalog-info.yaml file:

annotations:
  terraform/organization: orgName
  terraform/workspaces: workspaceName1,workspaceName2,workspaceName3

You will also need to have the terraform backend plugin installed and running.

Terraform Latest Run card

Latest Run card - Single Workspace

Latest Run card - Multiple Workspaces

This is an additional component that can be referenced with <EntityTerraformLatestRunCard> and imported and added to the EntityPage.tsx file for routing.

Terraform Workspace Health card

Workspace Health card - Light mode

This is an additional component that can be referenced with <EntityTerraformWorkspaceHealthAssessmentsCard> and imported and added to the EntityPage.tsx file for routing from the plugin root.

Alternatively it can be referenced from within another component, using the <TerraformWorkspaceHealthAssessments> tag.

It will render a Health Card for each workspace defined in your catalog-info.yaml file, with each Health Card containing child cards for Drift Metrics and Validation Checks for a particular workspace.

Terraform Drift Metrics

Workspace Health card - Drift Only

The Drift card is visible within the Workspace Health component by default, but can be optionally hidden using the showDrift property on the <TerraformWorkspaceHealthAssessments> tag, eg:

<TerraformWorkspaceHealthAssessments showDrift={false}>

The Drift card further incorporates a navigational element, providing a direct link to the dedicated Drift view for the Workspace within your Terraform deployment if a more granular breakdown is required.

Terraform Validation Checks

Workspace Health card - Validation Checks Only

The Validation Checks card is also visible within the Workspace Health component by default, but can be optionally hidden using the showValidationChecks property on the <TerraformWorkspaceHealthAssessments> tag, eg:

<TerraformWorkspaceHealthAssessments showValidationChecks={false}>

The Validation Checks card also incorporates a direct link to the Continuous Validation view for the Workspace within your Terraform deployment if a more detailed breakdown is needed.

0.7.6

8 months ago

0.7.5

9 months ago

0.10.0

7 months ago

0.9.0

7 months ago

0.8.0

8 months ago

0.7.4

10 months ago

0.7.3

10 months ago

0.7.1

1 year ago

0.5.0

2 years ago

0.4.0

2 years ago

0.6.0

1 year ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago