diff --git a/README.md b/README.md index 294bc72..410198d 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,10 @@ No modules. ### Outputs -No outputs. +| Name | Description | +|------|-------------| +| [extra_role_policies](#output_extra_role_policies) | The tenant extra role policy names | +| [extra_roles](#output_extra_roles) | The tenant extra approle roles | +| [tenant_admin_policy](#output_tenant_admin_policy) | The tenant admin policy name | +| [tenant_admin_role](#output_tenant_admin_role) | The tenant admin approle role | diff --git a/examples/.gitkeep b/examples/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/modules/.gitkeep b/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/outputs.tf b/outputs.tf index e69de29..d7cb775 100644 --- a/outputs.tf +++ b/outputs.tf @@ -0,0 +1,45 @@ +output "tenant_admin_role" { + value = { + role_id = vault_approle_auth_backend_role.tenant_admin.role_name + secret_id = vault_approle_auth_backend_role_secret_id.tenant_admin.secret_id + } + sensitive = true + description = "The tenant admin approle role" + depends_on = [ + vault_approle_auth_backend_role.tenant_admin, + vault_approle_auth_backend_role_secret_id.tenant_admin + ] +} + +output "tenant_admin_policy" { + value = vault_policy.tenant_admin.name + sensitive = false + description = "The tenant admin policy name" + depends_on = [vault_policy.tenant_admin] +} + +output "extra_roles" { + value = { + for key, role in vault_approle_auth_backend_role.extra_roles : + key => { + role_id = role.role_name + secret_id = vault_approle_auth_backend_role_secret_id.extra_roles[key].secret_id + } + } + sensitive = true + description = "The tenant extra approle roles" + depends_on = [ + vault_approle_auth_backend_role.extra_roles, + vault_approle_auth_backend_role_secret_id.extra_roles + ] +} + +output "extra_role_policies" { + value = { + for key, policy in vault_policy.extra_policies : + key => policy.name + } + sensitive = false + description = "The tenant extra role policy names" + depends_on = [vault_policy.extra_policies] +}