Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data "aws_vpc" "default" {
- default = true
- }
- data "aws_subnet_ids" "default" {
- vpc_id = data.aws_vpc.default.id
- }
- data "aws_security_group" "default" {
- name = "default"
- vpc_id = data.aws_vpc.default.id
- }
- data "aws_ami" "this" {
- most_recent = true
- owners = ["self", "amazon"]
- filter {
- name = "owner-alias"
- values = ["amazon"]
- }
- filter {
- name = "name"
- values = ["amzn2-ami-hvm*"]
- }
- filter {
- name = "architecture"
- values = ["x86_64"]
- }
- }
- module "ec2_cluster" {
- source = "terraform-aws-modules/ec2-instance/aws"
- version = "2.6.0"
- name = "credit_specification_test"
- ami = data.aws_ami.this.id
- # instance_type = "t2.micro"
- instance_type = "m4.large"
- subnet_ids = data.aws_subnet_ids.default.ids
- vpc_security_group_ids = [
- data.aws_security_group.default.id
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement