From 4f2bdbeb5aa364f0064422d965f39d26a084adfc Mon Sep 17 00:00:00 2001 From: imeime Date: Tue, 20 Feb 2024 12:33:25 -0500 Subject: [PATCH] addking new code for kingobotxt --- kingobo.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 kingobo.txt diff --git a/kingobo.txt b/kingobo.txt new file mode 100644 index 0000000..4f5239e --- /dev/null +++ b/kingobo.txt @@ -0,0 +1,42 @@ +kingobo.txt +adding terraform code + + cidr_block = "172.16.0.0/16" + + tags = { + Name = "kc_401" + } +} + +resource "aws_subnet" "my_subnet" { + vpc_id = aws_vpc.my_vpc.id + cidr_block = "172.16.10.0/24" + availability_zone = "us-west-2a" + + tags = { + Name = "kc_private" + } +} + +resource "aws_network_interface" "foo" { + subnet_id = aws_subnet.my_subnet.id + private_ips = ["172.16.10.100"] + + tags = { + Name = "public_sub" + } +} + +resource "aws_instance" "foo" { + ami = "ami-005e54dee72cc1d00" # us-west-2 + instance_type = "t2.micro" + + network_interface { + network_interface_id = aws_subnet.my_subnet.id + device_index = 0 + } + + credit_specification { + cpu_credits = "unlimited" + } +}