Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit 5304430

Browse files
author
Sean Sundberg
authored
Adds optional sync variable to order dependencies (#41)
Signed-off-by: Sean Sundberg <[email protected]>
1 parent 01dbc82 commit 5304430

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

.github/workflows/verify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
verify:
1414
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }}
1515
runs-on: ubuntu-latest
16-
container: quay.io/ibmgaragecloud/cli-tools:v0.12.0-lite
16+
container: quay.io/ibmgaragecloud/cli-tools:v14
1717

1818
strategy:
1919
matrix:

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ resource null_resource create_dirs {
9393
provisioner "local-exec" {
9494
command = "mkdir -p ${local.cluster_config_dir}"
9595
}
96+
97+
provisioner "local-exec" {
98+
command = "echo 'Sync value: ${var.sync}'"
99+
}
96100
}
97101

98102
resource null_resource print_resources {

module.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ versions:
2727
- source: github.com/cloud-native-toolkit/terraform-ibm-kms-key
2828
version: ">= 1.0.0"
2929
optional: true
30+
- id: sync
31+
refs: []
32+
interface: github.com/cloud-native-toolkit/automation-modules#sync
33+
optional: true
3034
variables:
3135
- name: resource_group_name
3236
moduleRef:
@@ -72,4 +76,7 @@ versions:
7276
scope: global
7377
- name: exists
7478
scope: module
75-
- name: ocp_entitlement
79+
- name: sync
80+
moduleRef:
81+
id: sync
82+
output: sync

outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ output "platform" {
4141
description = "Configuration values for the cluster platform"
4242
depends_on = [data.ibm_container_vpc_cluster.config]
4343
}
44+
45+
output "sync" {
46+
value = local.cluster_name
47+
description = "Value used to sync downstream modules"
48+
depends_on = [data.ibm_container_vpc_cluster.config]
49+
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,9 @@ variable "login" {
118118
description = "Flag indicating that after the cluster is provisioned, the module should log into the cluster"
119119
default = false
120120
}
121+
122+
variable "sync" {
123+
type = string
124+
description = "Value used to order dependencies"
125+
default = ""
126+
}

0 commit comments

Comments
 (0)