DEV Community

2

Part2 - AWS APP Runner -Terraform (IAC)

AWS APP Runner Terraform scripts
Prerequisites : Configured my AWS Credentials using aws configure

1.Create a file and name it as - provider.tf

provider "aws" {
  region = "eu-west-1"
}
Enter fullscreen mode Exit fullscreen mode

2.Create a file and name it as - main.tf

resource "aws_apprunner_service" "example" {
  service_name = "example"

  source_configuration {
    image_repository {
      image_configuration {
        port = "8000"
      }
      image_identifier      = "public.ecr.aws/aws-containers/hello-app-runner:latest"
      image_repository_type = "ECR_PUBLIC"
    }
    auto_deployments_enabled = false
  }

  tags = {
    Name = "example-apprunner-service"
  }
}
Enter fullscreen mode Exit fullscreen mode

3. Apply the terraform changes

Image description

4. Changes visible in aws console
Image description

and render the url https://3vizispdgx.eu-west-1.awsapprunner.com

Image description

5. Destroy APP Runner

Image description

Image description

Conclusion : Provisioned and destroyed AWS APP Runner using terraform scripts

💬 If you enjoyed reading this blog post and found it informative, please take a moment to share your thoughts by leaving a review and liking it 😀 and follow me in linkedin

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post