Created
January 17, 2020 10:59
-
-
Save miminar/8e920e6422d8adfcdba9ae858514558f to your computer and use it in GitHub Desktop.
Terraform AWS example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-east-1" | |
} | |
data "aws_ami" "rhel8" { | |
most_recent = true | |
filter { | |
name = "name" | |
values = ["rhel8-fips-dev"] | |
} | |
filter { | |
name = "virtualization-type" | |
values = ["hvm"] | |
} | |
owners = ["531415883065"] | |
} | |
resource "aws_instance" "rhel8test" { | |
ami = data.aws_ami.rhel8.id | |
instance_type = "t2.micro" | |
root_block_device { | |
volume_size = "51" | |
} | |
# VPC: | |
# name: devenv | |
# id: vpc-69705d0c | |
# Subnet: | |
# Name: devenv-subnet-1 | |
# id: subnet-cf57c596 | |
subnet_id = "subnet-cf57c596" | |
tags = { | |
Name = "sap-miminar-test" | |
} | |
associate_public_ip_address = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment