Skip to content

Commit 32d2492

Browse files
authored
feat: Permission Set Session Duration (#33)
* added session duration as an input * added session duration as an input * added session duration as an input * added session duration as an input
1 parent 7498916 commit 32d2492

File tree

7 files changed

+36
-27
lines changed

7 files changed

+36
-27
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ github/
7474
*.ovpn
7575

7676
*.zip
77+
account-map/
78+
.atmos/

README.md

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/README.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/policy-AdminstratorAccess.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ locals {
33
name = "AdministratorAccess",
44
description = "Allow Full Administrator access to the account",
55
relay_state = "",
6-
session_duration = "",
6+
session_duration = var.session_duration,
77
tags = {},
88
inline_policy = ""
99
policy_attachments = ["arn:${local.aws_partition}:iam::aws:policy/AdministratorAccess"]

src/policy-PoweruserAccess.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ locals {
33
name = "PowerUserAccess",
44
description = "Allow Poweruser access to the account",
55
relay_state = "",
6-
session_duration = "",
6+
session_duration = var.session_duration,
77
tags = {},
88
inline_policy = ""
99
policy_attachments = [

src/policy-TerraformUpdateAccess.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ locals {
4747
name = "TerraformUpdateAccess",
4848
description = "Allow access to Terraform state sufficient to make changes",
4949
relay_state = "",
50-
session_duration = "PT1H", # One hour, maximum allowed for chained assumed roles
50+
session_duration = var.session_duration,
5151
tags = {},
5252
inline_policy = one(data.aws_iam_policy_document.terraform_update_access[*].json),
5353
policy_attachments = []

src/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,9 @@ variable "groups" {
5252
EOT
5353
default = []
5454
}
55+
56+
variable "session_duration" {
57+
type = string
58+
description = "The default duration of the session in seconds for all permission sets. If not set, fallback to the default value in the module, which is 1 hour."
59+
default = ""
60+
}

0 commit comments

Comments
 (0)