policy and data template
This commit is contained in:
parent
5ce172fec3
commit
0e86b912bd
2 changed files with 23 additions and 0 deletions
12
project8/base.tf
Normal file
12
project8/base.tf
Normal 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
11
project8/policy.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "VisualEditor0",
|
||||
"Effect": "Allow",
|
||||
"Action": "ec2:*",
|
||||
"Resource": "*"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue