How to Create AWS AppStream resources in Terraform

0 min read 110 words

AWS AppStream has finally made its way into the Terraform AWS Provider.

If you are using hashicorp/aws version 3.67 or above, then you can do the following:

terraform {
  required_version = "~> 1.0"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.67"
    }
  }
}
provider "aws" {
  region = "eu-west-1"
  default_tags {
    tags = {
      Contact = "[email protected]"
      Environment = "dev"
      DeployedBy = "Automation:Terraform"
    }
  }
}

resource "aws_appstream_fleet" "example" {
  name          = "ao-tmp-fleet-1"
  image_name    = "Amazon-AppStream2-Sample-Image-02-04-2019"
  instance_type = "stream.standard.small"

  compute_capacity {
    desired_instances = 1
  }
}
resource "aws_appstream_stack" "example" {
  name = "ao-tmp-stack-1"
}
resource "aws_appstream_fleet_stack_association" "example" {
  fleet_name = aws_appstream_fleet.example.name
  stack_name = aws_appstream_stack.example.name
}
Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags