Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Truefoundry Google Cloud platform features module
| <a name="output_docker_registry_enabled"></a> [docker\_registry\_enabled](#output\_docker\_registry\_enabled) | Docker registry feature enabled |
| <a name="output_sa_auth_data"></a> [sa\_auth\_data](#output\_sa\_auth\_data) | Private key of the service account |
| <a name="output_secret_manger_enabled"></a> [secret\_manger\_enabled](#output\_secret\_manger\_enabled) | Secret manager feature enabled |
| <a name="output_serviceaccount_enabled"></a> [serviceaccount\_enabled](#output\_serviceaccount\_enabled) | Service account feature enabled |
| <a name="output_serviceaccount_key"></a> [serviceaccount\_key](#output\_serviceaccount\_key) | Service account keys |
| <a name="output_serviceaccount_key_creation_enabled"></a> [serviceaccount\_key\_creation\_enabled](#output\_serviceaccount\_key\_creation\_enabled) | Service account key creation feature enabled |
| <a name="output_serviceaccount_name"></a> [serviceaccount\_name](#output\_serviceaccount\_name) | Name of the service account |
<!-- END_TF_DOCS -->
14 changes: 12 additions & 2 deletions output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# IAM serviceaccount
################################################################################
output "sa_auth_data" {
value = var.service_account_enabled ? base64decode(google_service_account_key.truefoundry_platform_feature_service_account_key[0].private_key) : ""
value = var.service_account_enabled && var.service_account_key_creation_enabled ? base64decode(google_service_account_key.truefoundry_platform_feature_service_account_key[0].private_key) : ""
sensitive = true
description = "Private key of the service account"
}
Expand Down Expand Up @@ -41,6 +41,16 @@ output "artifact_registry_url" {
################################################################################
# IAM serviceaccount
################################################################################
output "serviceaccount_enabled" {
value = var.service_account_enabled
description = "Service account feature enabled"
}

output "serviceaccount_key_creation_enabled" {
value = var.service_account_key_creation_enabled
description = "Service account key creation feature enabled"
}

output "serviceaccount_name" {
value = var.service_account_enabled && var.service_account_enable_override ? var.service_account_override_name : local.serviceaccount_name
description = "Name of the service account"
Expand All @@ -65,4 +75,4 @@ output "secret_manger_enabled" {
output "cluster_integration_enabled" {
value = var.feature_cluster_integration_enabled
description = "Cluster integration feature enabled"
}
}