-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from asicsdigital/casper-SRE-70
Casper SRE-70
- Loading branch information
Showing
8 changed files
with
149 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.11.7 | ||
0.12.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
locals { | ||
"bucket_arn" = "arn:aws:s3:::${var.bucket_name}" | ||
"object_arn" = "arn:aws:s3:::${var.bucket_name}/${var.prefix}*" | ||
bucket_arn = "arn:aws:s3:::${var.bucket_name}" | ||
object_arn = "arn:aws:s3:::${var.bucket_name}/${var.prefix}*" | ||
write_access = var.write_access ? "_write" : "" | ||
delete_access = var.delete_access ? "_delete" : "" | ||
policy = var.write_access ? var.delete_access ? data.aws_iam_policy_document.user_policy_read_write_delete.json : data.aws_iam_policy_document.user_policy_read_write.json : data.aws_iam_policy_document.user_policy_read.json | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
output "iam_user_access_key_id" { | ||
value = "${aws_iam_access_key.key.id}" | ||
value = aws_iam_access_key.key.id | ||
} | ||
|
||
output "iam_user_secret_access_key" { | ||
value = "${aws_iam_access_key.key.secret}" | ||
value = aws_iam_access_key.key.secret | ||
sensitive = true | ||
} | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
variable "bucket_name" { | ||
type = "string" | ||
type = string | ||
description = "Name for s3 bucket" | ||
} | ||
|
||
variable "prefix" { | ||
type = "string" | ||
type = string | ||
description = "Prefix to grant access to, note this module does not add any trailing /" | ||
} | ||
|
||
variable "user_name" { | ||
type = "string" | ||
type = string | ||
description = "Short name for the IAM user to create" | ||
} | ||
|
||
variable "create_user" { | ||
default = true | ||
description = "True if a user needs to be created. False if the user already exists." | ||
} | ||
|
||
variable "force_destroy" { | ||
default = true | ||
description = "Force_destroy the IAM user created by this module? (Default true)" | ||
} | ||
|
||
variable "write_access" { | ||
default = true | ||
description = "Generated policy will have S3:PutObject permission" | ||
} | ||
|
||
variable "delete_access" { | ||
default = false | ||
description = "Generated policy will have S3:DeleteObject permission" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
terraform { | ||
required_version = ">= 0.12" | ||
} |