sg, eks, iam 모듈추가

This commit is contained in:
2022-12-28 22:15:11 +09:00
parent 878bae5c65
commit 0b1946ecb3
25 changed files with 342 additions and 41 deletions

View File

@ -1 +0,0 @@
sdjo

View File

@ -4,11 +4,27 @@ provider "aws" {
resource "aws_instance" "ubuntu" {
ami = "ami-0ab04b3ccbadfae1f"
instance_type = "t2.micro"
resource "aws_iam_role" "iam-role" {
name = "eks-cluster-test"
# Terraform's "jsonencode" function converts a
# Terraform expression result to valid JSON syntax.
assume_role_policy = jsonencode({
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Principal" : {
"Service" : [
"eks.amazonaws.com"
]
},
"Action" : "sts:AssumeRole"
}
]
})
tags = {
Name = "tf-ubuntu"
tag-key = "eks-cluster-rule"
}
}
}