Skip to content

Instantly share code, notes, and snippets.

@egonSchiele
Last active December 27, 2024 22:04
Show Gist options
  • Save egonSchiele/4b878a36ff3de95265c081a19249ed45 to your computer and use it in GitHub Desktop.
Save egonSchiele/4b878a36ff3de95265c081a19249ed45 to your computer and use it in GitHub Desktop.
app-runner-service.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = "us-west-2"
# This will tag all resources we create
# so we can easily find them later to delete.
default_tags {
tags = {
Terraform = "true"
}
}
}
resource "aws_apprunner_service" "example" {
service_name = "example"
source_configuration {
authentication_configuration {
access_role_arn = "put-your-arn-here"
}
image_repository {
image_configuration {
port = "80"
}
image_identifier = "11111111111.dkr.ecr.us-west-2.amazonaws.com/repo-name:latest"
image_repository_type = "ECR"
}
auto_deployments_enabled = false
}
tags = {
Name = "example-apprunner-service"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment