Software Engineering

Methods to Create AWS AppStream sources in Terraform

Methods to Create AWS AppStream sources in Terraform
Written by admin


AWS AppStream has lastly made its means into the Terraform AWS Supplier.

In case you are utilizing hashicorp/aws model 3.67 or above, then you are able to do the next:

terraform {
  required_version = "~> 1.0"
  required_providers {
    aws = {
      supply  = "hashicorp/aws"
      model = "~> 3.67"
    }
  }
}
supplier "aws" {
  area = "eu-west-1"
  default_tags {
    tags = {
      Contact = "[email protected]"
      Setting = "dev"
      DeployedBy = "Automation:Terraform"
    }
  }
}

useful resource "aws_appstream_fleet" "instance" {
  title          = "ao-tmp-fleet-1"
  image_name    = "Amazon-AppStream2-Pattern-Picture-02-04-2019"
  instance_type = "stream.normal.small"

  compute_capacity {
    desired_instances = 1
  }
}
useful resource "aws_appstream_stack" "instance" {
  title = "ao-tmp-stack-1"
}
useful resource "aws_appstream_fleet_stack_association" "instance" {
  fleet_name = aws_appstream_fleet.instance.title
  stack_name = aws_appstream_stack.instance.title
}

About the author

admin

Leave a Comment