website logo
HomeTwitterLinkedInLogin ➡️
⌘K
Overview
Getting started
Connect an Account
AWS Account
Azure Subscription
GCP Project
Managing Accounts
Reverse Terraform
Asset Explorer/Reverse Terraform
Diff
Diff Email
Snapshot Diff
Ignored properties
Environment Explorer
Compliance
GraphQL API
IaC Catalog
Overview
Getting Started with Terraform Blueprints
Configuration
Producer Flow
Consumer Flow
CI/CD Configuration
Management
Security
Feedback/Contact
Docs powered by archbee 
8min

Connect Terraform Modules

Overview

Now that there is a test workspace to work with, it's time to connect Terraform modules and define the configuration elements that will be needed to generate the wizard form display elements in the next step.

Connect KMS Terraform Module

To deploy our AWS KMS Key module, use the CloudPosse KMS Key Module. In main.tf, add the module resource block to the file:

Terraform
|


In this section, we've set two important identifiers. First, we've chosen the Terraform resource identifier kms_key, which will be used to refer to the Terraform properties such as variables, outputs, etc at plan and apply time. Second, we've chosen the AutoCloud identifier cpkmskey which will be used to dynamically configure relationships between modules and templates for assets such as pull requests and ticket contents.

Create Form Configuration for the KMS Module

Add an empty blueprint configuration below the autocloud_module definition for the KMS key. This will be used to configure the KMS key variables for display and code generation:

Terraform
|


The variable configurations will be configured in future steps.

Connect S3 Terraform Module & Create Form Configuration

To deploy our AWS S3 Bucket module, use the CloudPosse S3 Bucket Module. In main.tf, add the module resource and form configuration data resource blocks the file below the KMS key module assets:

Terraform
|


Create Global Form Configuration

Below the other resources in the main.tffile, add a global form configuration to consolidate variable definitions, collect global values, and define the final form configuration to display to the user:

Terraform
|


Apply Progress

Run terraform apply to deploy progress so far:

Terraform
|


CloudPosse's modules make use of their label module, and the module variables are stored in two files, context.tf and variables.tf.

Updated 02 Mar 2023
Did this page help you?
Yes
No
UP NEXT
Configure Variables
Docs powered by archbee 
TABLE OF CONTENTS
Overview
Connect KMS Terraform Module
Create Form Configuration for the KMS Module
Connect S3 Terraform Module & Create Form Configuration
Create Global Form Configuration
Apply Progress