Skip to main content

Secure Cloud Manager

SCM is a declarative configuration management tool to faciliate scalable management of IaC workflows.

The primary purpose of SCM is to act as a high-level abstraction with powerful primitives to manage IaC workflows that may need to span multiple Terraform workspaces. SCM is designed to be used in conjunction with Terraform Cloud or Terraform Enterprise.

Even if right now SCM generates code only for a single Terraform workspace, and technically all of it could be done with Terraform itself, having SCM as a separate tool allows for a more powerful abstraction that means you don't have to re-architect your Terraform code and workspace structure when you need to scale up or new features can only be achieved by crossing workspace boundaries.

We try to keep things simple and intuitive, but when the need arises, SCM could become a service to unblock certain features that are not possible with Terraform alone, all while not having to completely redesign how you manage your IaC because SCM takes care of that.

Currently, SCM can be used to do the following:

  • Create AWS Control Tower accounts
  • Create Terraform workspaces in Terraform Cloud/Enterprise with access to credentials to any single AWS account

Getting started

Prerequisites

  • Python 3.10 or newer
  • The Terraform CLI (used for terraform fmt)

In order to run the generated Terraform code, you will need:

  • An AWS Account with Control Tower enabled
  • Terraform Cloud or Terraform Enterprise account

Installation

SCM will be available on PyPI soon. For now, you can install it from GitHub:

$ pip install git+https://github.com/helsing-ai/scm.git

Configuration

The backend for SCM is currently entirely Terraform-based. This means that you need to hand the respective AWS and Terraform Cloud/Enterprise token to the initial Terraform workspace from which the execution of the generated Terraform code is to take place.

  • AWS_REGION
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_SESSION_TOKEN (optional)
  • TFE_HOSTNAME
  • TFE_TOKEN

The AWS credentials should have permissions to create AWS Accounts via the AWS Account Factory. It must also have the servicecatalog:ListProvisioningArtifact permission. The Terraform Cloud token should have permissions to create workspaces and upload configuration versions. While a TFE Organization-level token can create workspaces, it cannot upload configuration versions, which is why a Team-level or User-level token is required.

SCM understands "resources" that are defined in a YAML file that is largely inspired by Kubernetes resources. These resources are powerful abstractions on the concepts of AWS accounts and Terraform workspaces.

Example

Check out the example/manifests/ folder for a complete example. The files define settings for the code generation well as resources that inform the generated Terraform code. The generated code is then responsible, as per the resource definitions, to create an AWS account and Terraform workspace.

You can run the following commands to generate the Terraform code for the example, and then initialize and apply it:

$ ( cd example && python -m helsing.scm manifests/*.yaml )
$ ( cd example/generated && terraform init )
$ ( cd example/generated && terraform plan )

Before you actually try this, you may need to update some values in the settings.yaml file. At the minimum, you will need to update the product_id in the AwsTerraformCodegenSettings resource.

Release files for helsing-scm 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helsing-scm 0.2.1
File Size Uploaded
helsing_scm-0.2.1.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for helsing-scm 0.2.1
File Interpreter ABI Platform
helsing_scm-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / helsing_scm-0.2.1.tar.gz

Download URL helsing_scm-0.2.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
036b632836140bfd18c375b5fd3722c16dc7e3836ccc728e9a8cbc366453f230
BLAKE2b-256 checksum
How to use checksums
fd78d29e5f164c51cabccb902bb60d7e3e3817f59b451e2e668b6bc8fd3dd13d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Release files / helsing_scm-0.2.1-py3-none-any.whl

Download URL helsing_scm-0.2.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c860bf5b21e0599d1e764f81f367f0be148426080b38357f51e9166d35f0327
BLAKE2b-256 checksum
How to use checksums
c056e642f8631e408eeb4592820442808cfe63783115f2d153fd56cec26671fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page