forked from hadenlabs/terraform-aws-iam-s3-user
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: implement generator plop (hadenlabs#3)
- Loading branch information
Showing
6 changed files
with
129 additions
and
5 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
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,3 +1,12 @@ | ||
module "main" { | ||
source = "../.." | ||
depends_on = [] | ||
enabled = var.enabled | ||
name = var.name | ||
stage = var.stage | ||
namespace = var.namespace | ||
tags = var.tags | ||
use_fullname = var.use_fullname | ||
s3_actions = var.s3_actions | ||
s3_resources = var.s3_resources | ||
} |
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,36 @@ | ||
output "enabled" { | ||
description = "Enabled property of module" | ||
value = module.main.enabled | ||
} | ||
|
||
output "user_name" { | ||
description = "Normalized IAM user name" | ||
value = module.main.user_name | ||
} | ||
|
||
output "user_arn" { | ||
description = "The ARN assigned by AWS for this user" | ||
value = module.main.user_arn | ||
} | ||
|
||
output "user_unique_id" { | ||
description = "The unique ID assigned by AWS" | ||
value = module.main.user_unique_id | ||
} | ||
|
||
output "access_key_id" { | ||
sensitive = true | ||
description = "The access key ID" | ||
value = module.main.access_key_id | ||
} | ||
|
||
output "secret_access_key" { | ||
sensitive = true | ||
description = "The secret access key. This will be written to the state file in plain-text" | ||
value = module.main.secret_access_key | ||
} | ||
|
||
output "use_fullname" { | ||
description = "return if enabled use fullname" | ||
value = module.main.use_fullname | ||
} |
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,47 @@ | ||
variable "namespace" { | ||
type = string | ||
default = null | ||
description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique" | ||
} | ||
|
||
variable "stage" { | ||
type = string | ||
default = null | ||
description = "ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'" | ||
} | ||
|
||
variable "name" { | ||
type = string | ||
description = "name" | ||
} | ||
|
||
variable "tags" { | ||
type = map(string) | ||
description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`" | ||
default = {} | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
default = true | ||
description = "Set to false to prevent the module from creating any resources" | ||
} | ||
|
||
variable "use_fullname" { | ||
type = bool | ||
default = false | ||
description = <<-EOT | ||
If set to 'true' then the full ID for the IAM user name (e.g. `[var.namespace]-[var.stage]-[var.name]`) will be used. | ||
EOT | ||
} | ||
|
||
variable "s3_actions" { | ||
type = list(string) | ||
default = ["s3:GetObject"] | ||
description = "Actions to allow in the policy" | ||
} | ||
|
||
variable "s3_resources" { | ||
type = list(string) | ||
description = "S3 resources to apply the actions specified in the policy" | ||
} |
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