Skip to content

Commit 6719614

Browse files
authored
fix: update provider, auto run depends on (#495)
1 parent 1986a29 commit 6719614

File tree

13 files changed

+43
-18
lines changed

13 files changed

+43
-18
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ statement instead the previous block.
5757
| Name | Version |
5858
|------|---------|
5959
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
60-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.67.1 |
60+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.70.0 |
6161
| <a name="requirement_null"></a> [null](#requirement\_null) | = 3.2.2 |
6262
| <a name="requirement_random"></a> [random](#requirement\_random) | = 3.6.2 |
6363

@@ -74,16 +74,16 @@ statement instead the previous block.
7474

7575
| Name | Type |
7676
|------|------|
77-
| [ibm_cd_tekton_pipeline_trigger.ci_pipeline_webhook](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/cd_tekton_pipeline_trigger) | resource |
78-
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_branch_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
79-
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_name_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
80-
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_repo_url_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
81-
| [ibm_cr_namespace.cr_namespace](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/cr_namespace) | resource |
82-
| [ibm_resource_instance.cd_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/resources/resource_instance) | resource |
77+
| [ibm_cd_tekton_pipeline_trigger.ci_pipeline_webhook](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/cd_tekton_pipeline_trigger) | resource |
78+
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_branch_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
79+
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_name_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
80+
| [ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_repo_url_property](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/cd_tekton_pipeline_trigger_property) | resource |
81+
| [ibm_cr_namespace.cr_namespace](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/cr_namespace) | resource |
82+
| [ibm_resource_instance.cd_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/resources/resource_instance) | resource |
8383
| [null_resource.ci_pipeline_run](https://registry.terraform.io/providers/hashicorp/null/3.2.2/docs/resources/resource) | resource |
8484
| [random_string.resource_suffix](https://registry.terraform.io/providers/hashicorp/random/3.6.2/docs/resources/string) | resource |
8585
| [random_string.webhook_secret](https://registry.terraform.io/providers/hashicorp/random/3.6.2/docs/resources/string) | resource |
86-
| [ibm_resource_group.resource_group](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.67.1/docs/data-sources/resource_group) | data source |
86+
| [ibm_resource_group.resource_group](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.70.0/docs/data-sources/resource_group) | data source |
8787

8888
### Inputs
8989

@@ -589,6 +589,7 @@ statement instead the previous block.
589589
| <a name="input_toolchain_region"></a> [toolchain\_region](#input\_toolchain\_region) | The region identifier that will be used, by default, for all resource creation and service instance lookup. | `string` | `"us-south"` | no |
590590
| <a name="input_toolchain_resource_group"></a> [toolchain\_resource\_group](#input\_toolchain\_resource\_group) | The resource group that will be used, by default, for all resource creation and service instance lookups. This can be overridden on a per resource/service basis. | `string` | `"Default"` | no |
591591
| <a name="input_use_app_repo_for_cd_deploy"></a> [use\_app\_repo\_for\_cd\_deploy](#input\_use\_app\_repo\_for\_cd\_deploy) | Set to `true` to use the CI sample application repository as the deployment repository in the CD pipeline. This will be set in the pipeline config integration. | `bool` | `false` | no |
592+
| <a name="input_worker_id"></a> [worker\_id](#input\_worker\_id) | The identifier for the pipeline worker. Applies to the CI, CD and CC pipelines. | `string` | `"public"` | no |
592593

593594
### Outputs
594595

main.tf

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ module "devsecops_ci_toolchain" {
268268
pr_pipeline_branch = (var.ci_compliance_pipeline_pr_branch == "") ? var.compliance_pipeline_branch : var.ci_compliance_pipeline_pr_branch
269269
ci_pipeline_git_tag = (var.ci_pipeline_git_tag == "") ? var.pipeline_git_tag : var.ci_pipeline_git_tag
270270
pr_pipeline_git_tag = (var.pr_pipeline_git_tag == "") ? var.pipeline_git_tag : var.pr_pipeline_git_tag
271+
worker_id = var.worker_id
271272

272273
#SECRET PROVIDERS
273274
enable_key_protect = (local.ci_enable_key_protect == "true") ? true : false
@@ -466,6 +467,7 @@ module "devsecops_cd_toolchain" {
466467
toolchain_resource_group = (var.cd_toolchain_resource_group == "") ? var.toolchain_resource_group : var.cd_toolchain_resource_group
467468
pipeline_branch = (var.cd_compliance_pipeline_branch == "") ? var.compliance_pipeline_branch : var.cd_compliance_pipeline_branch
468469
pipeline_git_tag = (var.cd_pipeline_git_tag == "") ? var.pipeline_git_tag : var.cd_pipeline_git_tag
470+
worker_id = var.worker_id
469471

470472
#SECRET PROVIDERS
471473
enable_key_protect = (local.cd_enable_key_protect == "true") ? true : false
@@ -680,6 +682,7 @@ module "devsecops_cc_toolchain" {
680682
authorization_policy_creation = (var.cc_authorization_policy_creation == "") ? var.authorization_policy_creation : var.cc_authorization_policy_creation
681683
pipeline_branch = (var.cc_compliance_pipeline_branch == "") ? var.compliance_pipeline_branch : var.cc_compliance_pipeline_branch
682684
pipeline_git_tag = (var.cc_pipeline_git_tag == "") ? var.pipeline_git_tag : var.cc_pipeline_git_tag
685+
worker_id = var.worker_id
683686

684687
#SECRET PROVIDERS
685688
enable_key_protect = (local.cc_enable_key_protect == "true") ? true : false
@@ -860,9 +863,10 @@ module "devsecops_cc_toolchain" {
860863

861864
# Random string for webhook token
862865
resource "random_string" "webhook_secret" {
863-
length = 48
864-
special = false
865-
upper = false
866+
depends_on = [module.devsecops_ci_toolchain[0].ci_pipeline_id, module.devsecops_ci_toolchain[0].app_repo_url]
867+
length = 48
868+
special = false
869+
upper = false
866870
}
867871

868872
# Create webhook for CI pipeline
@@ -919,7 +923,8 @@ resource "null_resource" "ci_pipeline_run" {
919923
count = (var.autostart) ? 1 : 0
920924
depends_on = [
921925
ibm_cd_tekton_pipeline_trigger.ci_pipeline_webhook,
922-
ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_branch_property
926+
ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_branch_property,
927+
ibm_cd_tekton_pipeline_trigger_property.ci_pipeline_webhook_repo_url_property
923928
]
924929
triggers = {
925930
always_run = timestamp()

prereqs/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "IBM-Cloud/ibm"
6-
version = "= 1.67.1"
6+
version = "=1.70.0"
77
}
88

99
external = {

solutions/code-engine/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ statement instead the previous block.
5757
| Name | Version |
5858
|------|---------|
5959
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
60-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.67.1 |
60+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.70.0 |
6161

6262
### Modules
6363

@@ -570,6 +570,7 @@ No resources.
570570
| <a name="input_toolchain_region"></a> [toolchain\_region](#input\_toolchain\_region) | The region identifier that will be used, by default, for all resource creation and service instance lookup. This can be overridden on a per resource/service basis. | `string` | `"us-south"` | no |
571571
| <a name="input_toolchain_resource_group"></a> [toolchain\_resource\_group](#input\_toolchain\_resource\_group) | The resource group that will be used, by default, for all resource creation and service instance lookups. This can be overridden on a per resource/service basis. | `string` | `"Default"` | no |
572572
| <a name="input_use_app_repo_for_cd_deploy"></a> [use\_app\_repo\_for\_cd\_deploy](#input\_use\_app\_repo\_for\_cd\_deploy) | Set to `true` to use the CI sample application repository as the deployment repository in the CD pipeline. This will be set in the pipeline config integration. | `bool` | `true` | no |
573+
| <a name="input_worker_id"></a> [worker\_id](#input\_worker\_id) | The identifier for the pipeline worker. Applies to the CI, CD and CC pipelines. | `string` | `"public"` | no |
573574

574575
### Outputs
575576

solutions/code-engine/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ module "devsecops_da" {
143143
toolchain_resource_group = var.toolchain_resource_group
144144
toolchain_region = var.toolchain_region
145145
use_app_repo_for_cd_deploy = var.use_app_repo_for_cd_deploy
146+
worker_id = var.worker_id
146147
cc_app_group = var.cc_app_group
147148
cc_app_repo_auth_type = var.cc_app_repo_auth_type
148149
cc_app_repo_branch = var.cc_app_repo_branch

solutions/code-engine/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,11 @@ variable "toolchain_resource_group" {
936936
default = "Default"
937937
}
938938

939+
variable "worker_id" {
940+
type = string
941+
default = "public"
942+
description = "The identifier for the pipeline worker. Applies to the CI, CD and CC pipelines."
943+
}
939944

940945
########################################################
941946
##### START OF CC VARIABLES ##############

solutions/code-engine/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
ibm = {
66
source = "IBM-Cloud/ibm"
7-
version = "=1.67.1"
7+
version = "=1.70.0"
88
}
99
}
1010
}

solutions/kubernetes/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ statement instead the previous block.
5757
| Name | Version |
5858
|------|---------|
5959
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
60-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.67.1 |
60+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | =1.70.0 |
6161

6262
### Modules
6363

@@ -570,6 +570,7 @@ No resources.
570570
| <a name="input_toolchain_region"></a> [toolchain\_region](#input\_toolchain\_region) | The region identifier that will be used, by default, for all resource creation and service instance lookup. This can be overridden on a per resource/service basis. | `string` | `"us-south"` | no |
571571
| <a name="input_toolchain_resource_group"></a> [toolchain\_resource\_group](#input\_toolchain\_resource\_group) | The resource group that will be used, by default, for all resource creation and service instance lookups. This can be overridden on a per resource/service basis. | `string` | `"Default"` | no |
572572
| <a name="input_use_app_repo_for_cd_deploy"></a> [use\_app\_repo\_for\_cd\_deploy](#input\_use\_app\_repo\_for\_cd\_deploy) | Set to `true` to use the CI sample application repository as the deployment repository in the CD pipeline. This will be set in the pipeline config integration. | `bool` | `false` | no |
573+
| <a name="input_worker_id"></a> [worker\_id](#input\_worker\_id) | The identifier for the pipeline worker. Applies to the CI, CD and CC pipelines. | `string` | `"public"` | no |
573574

574575
### Outputs
575576

solutions/kubernetes/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ module "devsecops_da" {
142142
toolchain_name = var.toolchain_name
143143
toolchain_resource_group = var.toolchain_resource_group
144144
toolchain_region = var.toolchain_region
145+
worker_id = var.worker_id
145146
use_app_repo_for_cd_deploy = var.use_app_repo_for_cd_deploy
146147
cc_app_group = var.cc_app_group
147148
cc_app_repo_auth_type = var.cc_app_repo_auth_type

solutions/kubernetes/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,11 @@ variable "toolchain_resource_group" {
936936
default = "Default"
937937
}
938938

939+
variable "worker_id" {
940+
type = string
941+
default = "public"
942+
description = "The identifier for the pipeline worker. Applies to the CI, CD and CC pipelines."
943+
}
939944

940945
########################################################
941946
##### START OF CC VARIABLES ##############

0 commit comments

Comments
 (0)