Skip to content

Commit

Permalink
update, add example
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 24, 2022
1 parent 3d5e856 commit 5d294f5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,6 @@
- ldap-ou-create
- change to use trevx/ldap provider

* 2.0.1 -- 2022-05-24
- billing-policies
- add submodule for policies
2 changes: 1 addition & 1 deletion billing-policies/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ output "policies" {
description = "Map of label and policy JSON for billing accesses"
value = {
"full-billing" = data.aws_iam_policy_document.full_billing.json
"limited-billing" = data.aws_iam_policy_document.limitd_billing.json
"limited-billing" = data.aws_iam_policy_document.limited_billing.json
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "2.0.0"
_module_version = "2.0.1"
}
29 changes: 29 additions & 0 deletions examples/billing-policy/roles.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module "billing" {
source = "git@github.e.it.census.gov:terraform-modules/aws-inf-setup.git//billing-policies?ref=tf-upgrade"
}

module "role_full_billing" {
source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git?ref=tf-upgrade"

role_name = "inf-billing"
saml_provider_arn = module.saml.saml_provider
enable_ldap_creation = true
assume_policy_document = module.saml.saml_assume_policy
max_session_duration = 3600
ldap_user = var.ldap_user
ldap_password = var.ldap_password
inline_policies = [module.billing.policies["full-billing"]]
}

module "role_limited_billing" {
source = "git@github.e.it.census.gov:terraform-modules/aws-iam-role.git?ref=tf-upgrade"

role_name = "limited-billing"
saml_provider_arn = module.saml.saml_provider
enable_ldap_creation = true
assume_policy_document = module.saml.saml_assume_policy
max_session_duration = 3600
ldap_user = var.ldap_user
ldap_password = var.ldap_password
inline_policies = [module.billing.policies["limited-billing"]]
}

0 comments on commit 5d294f5

Please sign in to comment.