1
0
Fork 0

policy and data template

This commit is contained in:
Cedric Girard 2020-05-13 15:08:20 +02:00
parent 5ce172fec3
commit 0e86b912bd
Signed by: X-dark
GPG Key ID: E7D0E125DB9519E4
2 changed files with 23 additions and 0 deletions

12
project8/base.tf Normal file
View File

@ -0,0 +1,12 @@
provider "aws" {
region = "eu-west-2"
}
data "template_file" "template1" {
template = file("./policy.json")
}
resource "aws_iam_policy" "policy" {
name = "cedric-policy1"
policy = data.template_file.template1.rendered
}

11
project8/policy.json Normal file
View File

@ -0,0 +1,11 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "ec2:*",
"Resource": "*"
}
]
}