Skip to content

Commit

Permalink
v2.0.1: new version, add max_session_duration
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Dec 16, 2021
1 parent c97120e commit 3b1333a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 57 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
* v1.3.0-compat-tf-0.13 -- 20211122
- tag compat-tf-0.13
- add provider support for tf 0.13+

* 2.0.1 -- 20211216
- add max_session_duration variable
- split ldap variables into variables.ldap.tf
- add defaults.tf
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module "myrole1" {
ldap_password = "password1234$$"
# optional
max_session_duration = 14400 # 4h
ldap_host = "ldap.e.tco.census.gov"
ldap_port = 389
}
Expand Down Expand Up @@ -152,6 +153,7 @@ No modules.
| <a name="input_ldap_password"></a> [ldap\_password](#input\_ldap\_password) | LDAP password for ldap\_user for writing data into eDirectory or Active Directory | `string` | `""` | no |
| <a name="input_ldap_port"></a> [ldap\_port](#input\_ldap\_port) | LDAP port (default is 389 but also using STARTTLS) | `number` | `389` | no |
| <a name="input_ldap_user"></a> [ldap\_user](#input\_ldap\_user) | LDAP user for writing data into eDirectory or Active Directory | `string` | `""` | no |
| <a name="input_max_session_duration"></a> [max\_session\_duration](#input\_max\_session\_duration) | n/a | `number` | `3600` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component (role, policy). This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_role_description"></a> [role\_description](#input\_role\_description) | Role/application description | `string` | `""` | no |
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | Role/application name without prefix | `string` | n/a | yes |
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* ldap_password = "password1234$$"
*
* # optional
* max_session_duration = 14400 # 4h
* ldap_host = "ldap.e.tco.census.gov"
* ldap_port = 389
* }
Expand Down Expand Up @@ -135,8 +136,8 @@ locals {
resource "aws_iam_role" "role" {
name = local.role_name
description = local.role_description
force_detach_policies = false
max_session_duration = 3600
force_detach_policies = lookup(local._defaults["force_detatch_policies"], false)
max_session_duration = var.max_session_duration
# assume_role_policy = data.terraform_remote_state.common.outputs.inf_saml_assume_policy_document
assume_role_policy = var.assume_policy_document

Expand Down
58 changes: 4 additions & 54 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,64 +51,14 @@ variable "instance_profile_path" {
default = "/"
}

#---
# ldap
#---
variable "ldap_user" {
description = "LDAP user for writing data into eDirectory or Active Directory"
type = string
default = ""
}

variable "ldap_password" {
description = "LDAP password for ldap_user for writing data into eDirectory or Active Directory"
type = string
default = ""
}

variable "ldap_host" {
description = "LDAP Hostname (default is for eBOCAS)"
type = string
default = "ldap.e.tco.census.gov"
}

variable "ldap_port" {
description = "LDAP port (default is 389 but also using STARTTLS)"
type = number
default = 389
variable "max_session_duration" {
descriptio = "Override the maximum session duration from the default (3600)"
type = number
default = 3600
}

variable "component_tags" {
description = "Additional tags for Components (role, policy)"
type = map(map(string))
default = { "role" = {}, "policy" = {} }
}


## #---
## # instance role
## #---
## variable "ec2_role_name" {
## description = "EC2 instace Role/application name without prefix"
## type = string
## default = ""
## }
##
## variable "enable_instance_role" {
## description = "Flag to enable the creation of a partner EC2 instance role with specific policies and optionally a different name"
## type = bool
## default = false
## }
##
## variable "ec2_assume_policy_document" {
## description = "JSON policy document for EC2 instance role (default is sts:AssumeRole for ec2 service)"
## type = string
## default = ""
## }
##
## variable "ec2_attached_policies" {
## description = "List of IAM Policy ARNs to attach to this EC2 instance role"
## type = list(string)
## default = []
## }
##
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.3.0"
_module_version = "2.0.1"
}

0 comments on commit 3b1333a

Please sign in to comment.