Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 2.77 KB

.header.md

File metadata and controls

27 lines (20 loc) · 2.77 KB

Terraform Service Catalog Engine - Terraform Community Edition

The AWS Service Catalog Terraform Community Engine (TCE) provides an example for you to configure and install a Terraform engine in your AWS Service Catalog administrator account. The TCE deploys the core components needed to support Terraform Community Edition as an EXTERNAL AWS Service Catalog provisioning engine. With the engine installed into your account, you can use AWS Service Catalog as a single tool to organize, govern, and distribute your Terraform configurations within AWS. For more information about Terraform and AWS Service Catalog, see Getting started with Terraform.

AWS Service Catalog Engine Core will need to be deployed as part of AWS Service Catalog Terraform Community Engine in order to perform the below tasks:

  1. Terraform Community Engine receive messages from the queues and forwards the message to AWS Step Function.
  2. An AWS Step Function Workflow handles the request. The Terraform operations run in AWS CodeBuild.
  3. Terraform Engine sends provisioning results to the AWS Service Catalog service.

Architecture

SCE Core Architecture

Terraform Community Engine Workflow

  1. An AWS Step Function (State Machine) manages the Terraform Provisioning experience.
  2. AWS CodeBuild task triggers based on the update, provision or terminate operation.
  3. Terraform runner in the AWS CodeBuild performs the terraform apply action to provision or update the AWS resources.
  4. Terraform runner in the AWS CodeBuild also performs the terraform destroy action to destroy the AWS resources.
  5. Depending on the terraform runner results, the AWS Service Catalog product gets notified.
  6. AWS CodeBuild tasks success or failure results also get notified to the developers using the Amazon Simple Notification Service (SNS).
  7. AWS CodeBuild runs Terraform Apply to provision or update the AWS Service Catalog products. It also notifies the AWS Service Catalog in case of a failed response from the terraform runner.
  8. AWS CodeBuild runs Terraform Destroy to terminate the AWS Service Catalog product. It also notifies the AWS Service Catalog in case of a succeeded or failed response from the terraform runner.
  9. For any Succeeded results from terraform runner in AWS CodeBuild, AWS Step Function will run the process of parsing the success results and notifying the AWS Service Catalog using AWS Lambda Functions.
  10. AWS Lambda Function fetches the state file from S3 state bucket and parses outputs from the state file to record outputs.
  11. After getting the output, another AWS Lambda Function sends back the success notification and output results of Terraform provision or update to AWS Service Catalog.