mirror of
https://github.com/dap-ps/infra-dapps.git
synced 2025-02-24 01:48:15 +00:00
drop useless policy and s3 bucket
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
f5ad5cc44a
commit
9747601f1b
55
dev.tf
55
dev.tf
@ -16,72 +16,19 @@ resource "aws_iam_user_group_membership" "deploy" {
|
|||||||
groups = ["${aws_iam_group.deploy.name}"]
|
groups = ["${aws_iam_group.deploy.name}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_iam_policy" "policy" {
|
|
||||||
name = "test-policy"
|
|
||||||
description = "A test policy"
|
|
||||||
|
|
||||||
policy = <<EOF
|
|
||||||
{
|
|
||||||
"Version": "2012-10-17",
|
|
||||||
"Statement": [
|
|
||||||
{
|
|
||||||
"Effect": "Allow",
|
|
||||||
"Action": [
|
|
||||||
"s3:GetBucketLocation",
|
|
||||||
"s3:ListAllMyBuckets"
|
|
||||||
],
|
|
||||||
"Resource": "arn:aws:s3:::*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Effect": "Allow",
|
|
||||||
"Action": "s3:*",
|
|
||||||
"Resource": [
|
|
||||||
"arn:aws:s3:::${aws_s3_bucket.dev_dap_ps.id}",
|
|
||||||
"arn:aws:s3:::${aws_s3_bucket.dev_dap_ps.id}/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_iam_policy_attachment" "deploy" {
|
resource "aws_iam_policy_attachment" "deploy" {
|
||||||
name = "deploy-policy-attachment"
|
name = "deploy-policy-attachment"
|
||||||
users = ["${aws_iam_user.deploy.name}"]
|
|
||||||
groups = ["${aws_iam_group.deploy.name}"]
|
groups = ["${aws_iam_group.deploy.name}"]
|
||||||
policy_arn = "${aws_iam_policy.policy.arn}"
|
policy_arn = "arn:aws:iam::aws:policy/AWSElasticBeanstalkFullAccess"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RESOURCES ------------------------------------*/
|
/* RESOURCES ------------------------------------*/
|
||||||
|
|
||||||
resource "aws_s3_bucket" "dev_dap_ps" {
|
|
||||||
bucket = "${var.dap_ps_app_bucket_name}"
|
|
||||||
acl = "private"
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "dev.dap.ps application bucket"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_s3_bucket_object" "dev_dap_ps" {
|
|
||||||
bucket = "${aws_s3_bucket.dev_dap_ps.id}"
|
|
||||||
key = "dapps.zip"
|
|
||||||
source = "files/dapps.zip"
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_elastic_beanstalk_application" "dev_dap_ps" {
|
resource "aws_elastic_beanstalk_application" "dev_dap_ps" {
|
||||||
name = "dev-dap-ps-app"
|
name = "dev-dap-ps-app"
|
||||||
description = "dev.dap.ps application"
|
description = "dev.dap.ps application"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_elastic_beanstalk_application_version" "dev_dap_ps" {
|
|
||||||
name = "dev-dap-ps-app"
|
|
||||||
description = "dev.dap.ps application version (Terraform)"
|
|
||||||
application = "${aws_elastic_beanstalk_application.dev_dap_ps.name}"
|
|
||||||
bucket = "${aws_s3_bucket.dev_dap_ps.id}"
|
|
||||||
key = "${aws_s3_bucket_object.dev_dap_ps.id}"
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_elastic_beanstalk_environment" "dev_dap_ps" {
|
resource "aws_elastic_beanstalk_environment" "dev_dap_ps" {
|
||||||
name = "dev-dap-ps-app"
|
name = "dev-dap-ps-app"
|
||||||
application = "${aws_elastic_beanstalk_application.dev_dap_ps.name}"
|
application = "${aws_elastic_beanstalk_application.dev_dap_ps.name}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user