Creates an AWS Cloud9 EC2 environment and an IAM user, then assigns the user as a read-only member of the environment.

Terraform Template

resource "aws_cloud9_environment_ec2" "test" {
  instance_type = "t2.micro"
  name = "some-env"
}

resource "aws_cloud9_environment_membership" "test" {
  environment_id = aws_cloud9_environment_ec2.test.id
  permissions = "read-only"
  user_arn = aws_iam_user.test.arn
}

resource "aws_iam_user" "test" {
  name = "some-user"
}