Skip to content

Commit

Permalink
- remove default ldap provider, requires links to proper provider lda…
Browse files Browse the repository at this point in the history
…p configs and passing provider like

```hcl
    providers = { ldap = ldap.bocas }
```
  • Loading branch information
badra001 committed Oct 11, 2023
1 parent 810cd46 commit a3acd0b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
- change ldap.e.tco default to ldap2.e.tco
- add -p to mkdir

* 1.4.2 -- 2023-10-11
- remove default ldap provider, requires links to proper provider ldap configs and passing provider like
providers = { ldap = ldap.bocas }

## version 2.x

branch: compat-tf-0.13
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ Because of this quirk, this is a two-step apply. The first step creates the IAM
```

# Notes
On 2023-10-11, TCO changed the LDAP servers to (1) require authentication, and (2) update the TLS certificate. Because
of #1, the provider calls to the LDAP provider must provide credentials. This module requires you to pass a proper
ldap profile that includes credentials, even if you are not going to create an LDAP role.

The server replacements are as folows:
* ldap.e.tco.census.gov => ldap2.e.tco.census.gov
* ldap.tco.census.gov => nldap2.tco.census.gov
* nldap.tco.census.gov => nldap2.tco.census.gov

## Policies

When using `attached_policies`, it is important those policy ARNs exist before attempting to use the module
Expand All @@ -44,6 +53,9 @@ Creating a SAML role with two attached policies
```hcl
module "myrole1" {
source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
providers = {
ldap = ldap.ebocas
}
role_name = "my-role1"
role_description = "Role to do some super cool stuff"
Expand All @@ -66,6 +78,9 @@ Creating a non-SAML role
```hcl
module "myrole2" {
source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
providers = {
ldap = ldap
}
role_name = "my-role2"
attached_policies = [ data.aws_iam_policy.aws-managed-readonlyaccess.arn ]
Expand All @@ -86,6 +101,9 @@ data "aws_iam_document_policy" "my-policy-1" {
module "myrole3" {
source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
providers = {
ldap = ldap
}
role_name = "my-role3"
attached_policies = [ data.aws_iam_policy.aws-managed-readonlyaccess.arn ]
Expand Down
18 changes: 18 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
* ```
*
* # Notes
* On 2023-10-11, TCO changed the LDAP servers to (1) require authentication, and (2) update the TLS certificate. Because
* of #1, the provider calls to the LDAP provider must provide credentials. This module requires you to pass a proper
* ldap profile that includes credentials, even if you are not going to create an LDAP role.
*
* The server replacements are as folows:
* * ldap.e.tco.census.gov => ldap2.e.tco.census.gov
* * ldap.tco.census.gov => nldap2.tco.census.gov
* * nldap.tco.census.gov => nldap2.tco.census.gov
*
* ## Policies
*
* When using `attached_policies`, it is important those policy ARNs exist before attempting to use the module
Expand All @@ -45,6 +54,9 @@
* ```hcl
* module "myrole1" {
* source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
* providers = {
* ldap = ldap.ebocas
* }
*
* role_name = "my-role1"
* role_description = "Role to do some super cool stuff"
Expand All @@ -67,6 +79,9 @@
* ```hcl
* module "myrole2" {
* source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
* providers = {
* ldap = ldap
* }
*
* role_name = "my-role2"
* attached_policies = [ data.aws_iam_policy.aws-managed-readonlyaccess.arn ]
Expand All @@ -87,6 +102,9 @@
*
* module "myrole3" {
* source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git"
* providers = {
* ldap = ldap
* }
*
* role_name = "my-role3"
* attached_policies = [ data.aws_iam_policy.aws-managed-readonlyaccess.arn ]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
locals {
_module_version = "1.4.1"
_module_version = "1.4.2"
# _module_version = "2.2.0"
}

0 comments on commit a3acd0b

Please sign in to comment.