added terrafrom configs
This commit is contained in:
24
111111111111/iam/roles/main.tf
Normal file
24
111111111111/iam/roles/main.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
terraform {
|
||||
backend "s3" {
|
||||
profile = "terra"
|
||||
bucket = "mytesting-tf-states"
|
||||
key = "111111111111/iam/roles/terraform.tfstate"
|
||||
region = "eu-west-1"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resource "aws_iam_policy" "s3_bucker_access_policy" {
|
||||
name = "s3_bucker_access_policy"
|
||||
path = "/"
|
||||
description = "s3_bucker_access_policy"
|
||||
|
||||
policy = data.template_file.s3_policy.rendered
|
||||
}
|
||||
|
||||
resource "aws_iam_role" "role_c" {
|
||||
name = "role_c"
|
||||
|
||||
assume_role_policy = data.template_file.asume_role.rendered
|
||||
managed_policy_arns = [aws_iam_policy.s3_bucker_access_policy.arn]
|
||||
}
|
||||
Reference in New Issue
Block a user