Skip to content

Commit f054044

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
fix: add wait for pod status
1 parent ee47b87 commit f054044

File tree

26 files changed

+42
-10
lines changed

26 files changed

+42
-10
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ https://terraform-ibm-modules.github.io/documentation/#/implementation-guideline
2020
<!-- BEGIN OVERVIEW HOOK -->
2121
## Overview
2222
* [terraform-ibm-watsonx-self-managed-ocp](#terraform-ibm-watsonx-self-managed-ocp)
23+
* [Submodules](./modules)
2324
* [Examples](./examples)
2425
* [Basic example](./examples/basic)
2526
* [Contributing](#contributing)
@@ -78,22 +79,24 @@ For more information on access and permissions, see [IBM Cloud IAM service roles
7879
|------|---------|
7980
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
8081
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >=1.79.1 |
82+
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.2.1, < 4.0.0 |
8183

8284
### Modules
8385

8486
| Name | Source | Version |
8587
|------|--------|---------|
86-
| <a name="module_build_cpd_image"></a> [build\_cpd\_image](#module\_build\_cpd\_image) | ./deploy/cpd-image-build | n/a |
87-
| <a name="module_cloud_pak_deployer"></a> [cloud\_pak\_deployer](#module\_cloud\_pak\_deployer) | ./deploy/cloud-pak-deployer | n/a |
88-
| <a name="module_config"></a> [config](#module\_config) | ./deploy/cloud-pak-deployer/config | n/a |
89-
| <a name="module_watsonx_ai"></a> [watsonx\_ai](#module\_watsonx\_ai) | ./deploy/watsonx-ai | n/a |
90-
| <a name="module_watsonx_data"></a> [watsonx\_data](#module\_watsonx\_data) | ./deploy/watsonx-data | n/a |
88+
| <a name="module_build_cpd_image"></a> [build\_cpd\_image](#module\_build\_cpd\_image) | ./modules/cpd-image-build | n/a |
89+
| <a name="module_cloud_pak_deployer"></a> [cloud\_pak\_deployer](#module\_cloud\_pak\_deployer) | ./modules/cloud-pak-deployer | n/a |
90+
| <a name="module_config"></a> [config](#module\_config) | ./modules/cloud-pak-deployer/config | n/a |
91+
| <a name="module_watsonx_ai"></a> [watsonx\_ai](#module\_watsonx\_ai) | ./modules/watsonx-ai | n/a |
92+
| <a name="module_watsonx_data"></a> [watsonx\_data](#module\_watsonx\_data) | ./modules/watsonx-data | n/a |
9193

9294
### Resources
9395

9496
| Name | Type |
9597
|------|------|
9698
| [ibm_container_addons.odf_cluster_addon](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/container_addons) | resource |
99+
| [null_resource.wait_for_cloud_pak_deployer_complete](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
97100
| [ibm_container_vpc_cluster.cluster_info](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_vpc_cluster) | data source |
98101

99102
### Inputs

main.tf

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data "ibm_container_vpc_cluster" "cluster_info" {
1010

1111
module "build_cpd_image" {
1212
count = var.cloud_pak_deployer_image == null ? 1 : 0
13-
source = "./deploy/cpd-image-build"
13+
source = "./modules/cpd-image-build"
1414
prefix = var.prefix
1515
ibmcloud_api_key = var.ibmcloud_api_key
1616
region = var.region
@@ -32,7 +32,7 @@ resource "ibm_container_addons" "odf_cluster_addon" {
3232
}
3333

3434
module "watsonx_ai" {
35-
source = "./deploy/watsonx-ai"
35+
source = "./modules/watsonx-ai"
3636
depends_on = [ibm_container_addons.odf_cluster_addon]
3737
watson_assistant_install = var.watson_assistant_install
3838
watson_discovery_install = var.watson_discovery_install
@@ -41,7 +41,7 @@ module "watsonx_ai" {
4141
}
4242

4343
module "watsonx_data" {
44-
source = "./deploy/watsonx-data"
44+
source = "./modules/watsonx-data"
4545
depends_on = [ibm_container_addons.odf_cluster_addon]
4646
watsonx_data_install = var.watsonx_data_install
4747
}
@@ -52,7 +52,7 @@ module "cloud_pak_deployer" {
5252
module.watsonx_data,
5353
module.build_cpd_image
5454
]
55-
source = "./deploy/cloud-pak-deployer"
55+
source = "./modules/cloud-pak-deployer"
5656
cloud_pak_deployer_config = merge(
5757
module.config.cloud_pak_deployer_config_base,
5858
{
@@ -79,9 +79,19 @@ module "cloud_pak_deployer" {
7979
cpd_entitlement_key = var.cpd_entitlement_key
8080
}
8181

82+
resource "null_resource" "wait_for_cloud_pak_deployer_complete" {
83+
provisioner "local-exec" {
84+
command = "${path.module}/scripts/wait_for_cpd_pod.sh"
85+
}
86+
triggers = {
87+
always_run = timestamp()
88+
}
89+
depends_on = [module.cloud_pak_deployer]
90+
}
91+
8292
# Cloud Pak Deployer configuration file local variable(s) only
8393
module "config" {
84-
source = "./deploy/cloud-pak-deployer/config"
94+
source = "./modules/cloud-pak-deployer/config"
8595
cluster_name = var.cluster_name
8696
cpd_version = var.cpd_version
8797
openshift_version = local.openshift_version
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)