You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solutions/project/DA-inputs.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The `builds` input variable allows you to provide details of the of builds which
17
17
18
18
### Options for Builds
19
19
20
-
-`output_image` (required): The name of the image.
20
+
-`output_image` (optional): The name of the image. A container image can be identified by a container image reference with the following structure: registry / namespace / repository : tag. If not provided, the name is automatically build using region registry / container_registry_namespace input / build name.
21
21
-`output_secret` (required): The secret that is required to access the image registry.
22
22
-`source_url` (required): The URL of the code repository.
23
23
-`strategy_type` (required): Specifies the type of source to determine if your build source is in a repository or based on local source code.
@@ -118,10 +118,30 @@ The `secrets` input variable allows you to provide a method to include sensitive
118
118
### Example for Secrets
119
119
120
120
```hcl
121
+
# generic secret
121
122
{
122
123
"your-secret-name" = {
123
124
format = "generic"
124
125
data = { "key_1" : "value_1", "key_2" : "value_2" }
# This will cause Terraform to fail if "error" is present in the external script output executed as a part of container_registry_region
36
+
# tflint-ignore: terraform_unused_declarations
37
+
fail_if_registry_region_error=local.registry_region_error!=null?tobool("Registry region script failed: ${local.registry_region_error}") :null
38
+
39
+
# if no build defines a container image reference (output_image), a new container registry namespace must be created using container_registry_namespace.
Copy file name to clipboardExpand all lines: solutions/project/variables.tf
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ variable "project_name" {
46
46
variable"builds" {
47
47
description="A map of code engine builds to be created.[Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-code-engine/blob/main/solutions/project/DA-inputs.md#builds)"
48
48
type=map(object({
49
-
output_image =string
49
+
output_image =optional(string)
50
50
output_secret =string# pragma: allowlist secret
51
51
source_url =string
52
52
strategy_type =string
@@ -61,6 +61,20 @@ variable "builds" {
61
61
default={}
62
62
}
63
63
64
+
variable"container_registry_namespace" {
65
+
description="The name of the namespace to create in IBM Cloud Container Registry for organizing container images. Used only for builds that do not have output_image set."
0 commit comments