Announcing Support for Amazon ECS Anywhere in the Terraform AWS Provider
The Terraform AWS provider now supports ECS Anywhere, a new capability in Amazon ECS that supports running and managing container-based applications on customers’ on-premises servers.
In partnership with Amazon Web Services (AWS), we are pleased to announce launch-day support for Amazon ECS Anywhere in the Terraform AWS Provider. ECS Anywhere is a new offering from Amazon ECS that allows users to run containerized workflows in a variety of environments.
» How It Works
Previously, ECS would use compute capacity in an AWS region, Local Zone, Wavelength Zone, or Outpost. With this launch, ECS extends its capabilities to include other compute capacity, such as customer-owned virtual machines or bare-metal servers, in on-premises environments — without requiring customers to install or operate container orchestration software.
ECS Anywhere simplifies on-premises container management so that there is no need to run, update, or maintain container orchestrators on-premises. With consistent tooling and governance, you can employ the same tools and APIs for all container-based applications regardless of operating environment. By using ECS Anywhere to manage your hybrid footprint, you can containerize and run applications in on-premises environments first and easily expand to the cloud whenever you're ready.
Additional information about this service can be found in Getting Started with ECS Anywhere from AWS, and the ECS Anywhere documentation.
» Configuring ECS Anywhere in the Terraform AWS Provider
To get started with ECS Anywhere in the Terraform AWS provider, you will need to add an additional property, EXTERNAL
, to a new or existing aws_ecs_task_definition
.
In order to try out this feature, you will need:
- Terraform v0.12 or greater installed
- The latest version of the Terraform AWS provider
The Terraform configuration below demonstrates how the Terraform AWS provider can be used to configure ECS Anywhere.
resource "aws_ecs_task_definition" "service" {
container_definitions = jsonencode(
[
{
cpu = 10
essential = true
image = "nginx"
memory = 512
name = "nginx"
portMappings = [
{
containerPort = 80
hostPort = 80
},
]
},
]
)
family = "service"
requires_compatibilities = ["EXTERNAL",]
}
» Further Information
For more information on how to use this feature in Terraform, consult the provider documentation in the Terraform Registry. To report bugs or request enhancements for this feature, open an issue on the Terraform AWS Provider repository on GitHub. We would love to hear your feedback.
Sign up for the latest HashiCorp news
More blog posts like this one
New Terraform integrations with Crowdstrike, Datadog, JFrog, Red Hat, and more
12 new Terraform integrations from 9 partners provide more options to automate and secure cloud infrastructure management.
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.