Skip to content

Commit

Permalink
Merge pull request #90 from silinternational/develop
Browse files Browse the repository at this point in the history
Updated Terraform module
  • Loading branch information
briskt authored Mar 17, 2022
2 parents 9864788 + f6822ec commit edc5eea
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
*/
module "serverless-user" {
source = "silinternational/serverless-user/aws"
version = "0.1.0"
version = "0.1.1"

app_name = "mfa-api"
aws_region = var.aws_region
enable_api_gateway = true

extra_policies = [local.s3_policy, local.api_gateway_policy]
}

output "serverless-access-key-id" {
Expand All @@ -20,39 +18,3 @@ output "serverless-secret-access-key" {
value = module.serverless-user.aws_secret_access_key
sensitive = true
}


locals {
s3_policy = jsonencode({
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Action" : [
"s3:GetBucketPolicy",
],
"Resource" : [
"arn:aws:s3:::mfa-api-*-serverlessdeploymentbucket*",
]
},
]
})

api_gateway_policy = jsonencode({
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Action" : [
"apigateway:UpdateRestApiPolicy",
],
"Resource" : [
// dev-mfa-api
"arn:aws:apigateway:${var.aws_region}:*:restapis/7f2jflg37i",
// prod-mfa-api
"arn:aws:apigateway:${var.aws_region}:*:restapis/7hk96xvik6",
]
},
]
})
}

0 comments on commit edc5eea

Please sign in to comment.