Sha256: 3821637267527df6cfcb812b1bdb315225f6a3ae90711fa9e9e21c706a03c846

Contents?: true

Size: 582 Bytes

Versions: 104

Compression:

Stored size: 582 Bytes

Contents

data "aws_ami" "ubuntu"
  most_recent = true
  filter {
    name   =   "name"
    values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
  }

  filter {
    name    = "virtualization-type"
    values = ["hvm"]
  }
  owners = ["099720109477"] # Canonical
)

resource "aws_instance" "this" {
  ami           = data.aws_ami.ubuntu.id
  instance_type = "t2.micro"
}

resource "aws_security_group" "this" {
  description = "Demo SG"
  vpc_id = var.vpc_id
  tags = {
    Name: var.name
  }
}

output "aws_security_group_arn" {
  value = "aws_security_group_arn.this.arn"
}

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
terraspace-2.2.17 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.16 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.15 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.14 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.13 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.12 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.11 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.10 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.9 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.8 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.7 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.6 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.5 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.4 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.3 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.2 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.1 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.2.0 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.1.7 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf
terraspace-2.1.6 spec/fixtures/projects/hcl/aws/app/modules/instance/main.tf