simple Flashcards

1
Q

aws_security_group

A

name = “allow_ssh”
vpc_id = data.aws_vpc.default.id
description = “Allow SSH inbound traffic”

ingress {
from_port = 22
to_port = 22
protocol = “tcp”
cidr_blocks = [“73.45.229.14/32”]
}

egress {
from_port = 0
to_port = 0
protocol = “-1”
cidr_blocks = [“0.0.0.0/0”]
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

data “aws_vpc”

A

default = true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

data aws_subnet

A

vpc_id = data.aws_vpc.default.id
filter {
name = “availability-zone”
values = [“us-west-2a”] }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

aws_instance

A

ami = data.aws_ami.amzn2_ami.id
instance_type = “t2.micro”
key_name = “my-key-pair”
vpc_security_group_ids = [aws_security_group.allow_ssh.id]
associate_public_ip_address = true
subnet_id = data.aws_subnet.default.id

tags = {
Name = “example-instance”
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

data “aws_ami”

A

most_recent = true
owners = [“amazon”]
filter {
name = “name”
values = [“amzn2-ami-kernel-*-x86_64-gp2”]
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

aws_key

A

key_name = “my-key-pair”
public_key = file(“/home/silvia/udemy/me/simple/simple.pub”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly