Skip to content

Commit 87e4e50

Browse files
fix: Error when requesting no project to be created (#99)
1 parent 14d1457 commit 87e4e50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,22 @@ output "watsonx_governance_dashboard_url" {
129129
}
130130

131131
output "watsonx_project_id" {
132-
value = module.configure_project[0].watsonx_project_id
132+
value = var.watsonx_project_name == null || var.watsonx_project_name == "" ? null : module.configure_project[0].watsonx_project_id
133133
description = "The ID watsonx project that's created."
134134
}
135135

136136
output "watsonx_project_location" {
137-
value = module.configure_project[0].watsonx_project_location
137+
value = var.watsonx_project_name == null || var.watsonx_project_name == "" ? null : module.configure_project[0].watsonx_project_location
138138
description = "The location watsonx project that's created."
139139
}
140140

141141
output "watsonx_project_bucket_name" {
142-
value = module.configure_project[0].watsonx_project_bucket_name
142+
value = var.watsonx_project_name == null || var.watsonx_project_name == "" ? null : module.configure_project[0].watsonx_project_bucket_name
143143
description = "The name of the COS bucket created by the watsonx project."
144144
}
145145

146146
output "watsonx_project_url" {
147-
value = "https://dataplatform.cloud.ibm.com/projects/${module.configure_project[0].watsonx_project_id}?context=wx&sync_account_id=${ibm_resource_instance.machine_learning_instance.account_id}"
147+
value = var.watsonx_project_name == null || var.watsonx_project_name == "" ? null : "https://dataplatform.cloud.ibm.com/projects/${module.configure_project[0].watsonx_project_id}?context=wx&sync_account_id=${ibm_resource_instance.machine_learning_instance.account_id}"
148148
description = "The URL of the watsonx project that's created."
149149
}
150150

0 commit comments

Comments
 (0)