AWS SAM CLI Terraform support (original) (raw)

This section covers using the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) with your Terraform projects and Terraform Cloud.

To provide feedback and submit feature requests, create a GitHub Issue.

Topics

What is AWS SAM CLI support for Terraform?

Use the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) with your Terraform projects or Terraform Cloud to perform local debugging and testing of:

For an introduction to Terraform, see What is Terraform? at the HashiCorp Terraform website.

To provide feedback and submit feature requests, create a GitHub Issue.

Note

As part of the parsing step of AWS SAM CLI's integration, AWS SAM CLI processes user commands generate project files and data. The command output should remain unchanged, but in certain environments, the environment or runner may inject additional logs or information in the output.

Topics

What is the AWS SAM CLI?

The AWS SAM CLI is a command line tool that you can use with AWS SAM templates and supported third-party integrations, such as Terraform, to build and run your serverless applications. For an introduction to the AWS SAM CLI, see What is the AWS SAM CLI?.

The AWS SAM CLI supports the following commands for Terraform:

How do I use the AWS SAM CLI with Terraform?

The core Terraform workflow consists of three stages: Write, Plan, and Apply. With AWS SAM CLI support for Terraform, you can take advantage of the AWS SAM CLI sam local set of commands while continuing to use your Terraform workflows to manage your applications on AWS. Generally, this means the following:

For an example of using the AWS SAM CLI with Terraform, see Better together: AWS SAM CLI and HashiCorp Terraform at the AWS Compute Blog.

Next steps

To complete all prerequisites and set up Terraform, see Getting started with Terraform support for AWS SAM CLI.