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
| <aname="input_bindings"></a> [bindings](#input\_bindings)| A map of code engine bindings to be created. | <pre>map(object({<br/> secret_name = string<br/> components = list(object({<br/> name = string<br/> resource_type = string<br/> }))<br/> }))</pre> |`{}`| no |
160
-
| <aname="input_builds"></a> [builds](#input\_builds)| A map of code engine builds to be created. Requires 'ibmcloud\_api\_key' to be set for authentication and execution. | <pre>map(object({<br/> output_image = string<br/> output_secret = string # pragma: allowlist secret<br/> source_url = string<br/> strategy_type = string<br/> source_context_dir = optional(string)<br/> source_revision = optional(string)<br/> source_secret = optional(string)<br/> source_type = optional(string)<br/> strategy_size = optional(string)<br/> strategy_spec_file = optional(string)<br/> timeout = optional(number)<br/> }))</pre> |`{}`| no |
161
+
| <a name="input_builds"></a> [builds](#input\_builds) | A map of code engine builds to be created. Requires 'ibmcloud\_api\_key' to be set for authentication and execution. | <pre>map(object({<br/> output_image = optional(string)<br/> output_secret = optional(string) # pragma: allowlist secret<br/> source_url = string<br/> strategy_type = optional(string)<br/> source_context_dir = optional(string)<br/> source_revision = optional(string)<br/> source_secret = optional(string)<br/> source_type = optional(string)<br/> strategy_size = optional(string)<br/> strategy_spec_file = optional(string)<br/> timeout = optional(number)<br/> region = optional(string)<br/> container_registry_namespace = optional(string)<br/> prefix = optional(string)<br/> }))</pre> | `{}` | no |
161
162
| <aname="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules)| The context-based restrictions rule to create. Only one rule is allowed. | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> |`[]`| no |
162
163
| <aname="input_config_maps"></a> [config\_maps](#input\_config\_maps)| A map of code engine config maps to be created. | <pre>map(object({<br/> data = map(string)<br/> }))</pre> |`{}`| no |
163
164
| <aname="input_domain_mappings"></a> [domain\_mappings](#input\_domain\_mappings)| A map of code engine domain mappings to be created. | <pre>map(object({<br/> tls_secret = string # pragma: allowlist secret<br/> components = list(object({<br/> name = string<br/> resource_type = string<br/> }))<br/> }))</pre> |`{}`| no |
Copy file name to clipboardExpand all lines: examples/build/variables.tf
+7-23Lines changed: 7 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,20 @@ variable "ibmcloud_api_key" {
8
8
sensitive=true
9
9
}
10
10
11
+
variable"region" {
12
+
type=string
13
+
description="Region to provision all resources created by this example"
14
+
default="us-south"
15
+
}
16
+
11
17
variable"prefix" {
12
18
type=string
13
19
description="Prefix to append to all resources created by this example"
14
-
default="ce-prj"
20
+
default="ce-build"
15
21
}
16
22
17
23
variable"resource_group" {
18
24
type=string
19
25
description="The name of an existing resource group to provision resources in to. If not set a new resource group will be created using the prefix variable"
description="An existing Secrets Manager GUID. The existing Secret Manager instance must have private certificate engine configured. If not provided an new instance will be provisioned."
30
-
default=null
31
-
}
32
-
33
-
variable"existing_sm_instance_region" {
34
-
type=string
35
-
description="Required if value is passed into `var.existing_sm_instance_guid`."
36
-
default=null
37
-
}
38
-
39
-
variable"existing_cert_secret_id" {
40
-
type=string
41
-
description="Required if value is passed into `var.existing_sm_instance_guid`."
| <aname="input_container_registry_api_key"></a> [container\_registry\_api\_key](#input\_container\_registry\_api\_key)| The API key for the container registry in the target account. This is only used if 'output\_secret' is not set and a new registry secret needs to be created. If not provided, the IBM Cloud API key (ibmcloud\_api\_key) will be used instead. |`string`|`null`| no |
62
+
| <aname="input_container_registry_namespace"></a> [container\_registry\_namespace](#input\_container\_registry\_namespace)| The name of the namespace to create in IBM Cloud Container Registry for organizing container images. Must be set if 'output\_image' is not set. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<container_registry_namespace>` format. |`string`|`null`| no |
57
63
| <aname="input_existing_resource_group_id"></a> [existing\_resource\_group\_id](#input\_existing\_resource\_group\_id)| The ID of an existing resource group where build will be provisioned. This must be the same resource group in which the code engine project was created. |`string`| n/a | yes |
58
64
| <aname="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key)| The IBM Cloud API key. |`string`| n/a | yes |
59
65
| <aname="input_name"></a> [name](#input\_name)| The name of the build. |`string`| n/a | yes |
60
-
| <aname="input_output_image"></a> [output\_image](#input\_output\_image)| The name of the image. |`string`| n/a | yes |
61
-
| <aname="input_output_secret"></a> [output\_secret](#input\_output\_secret)| The secret that is required to access the image registry. |`string`| n/a | yes |
66
+
| <aname="input_output_image"></a> [output\_image](#input\_output\_image)| A container image can be identified by a container image reference with the following structure: registry / namespace / repository:tag. [Learn more](https://cloud.ibm.com/docs/codeengine?topic=codeengine-getting-started).<br/><br/>If not provided, the value will be derived from the 'container\_registry\_namespace' input variable, which must not be null in that case. |`string`|`null`| no |
67
+
| <aname="input_output_secret"></a> [output\_secret](#input\_output\_secret)| The name of the Code Engine secret that contains an API key to access the IBM Cloud Container Registry.<br/>The API key stored in this secret must have push permissions for the specified container registry namespace.<br/>If this secret is not provided, a Code Engine secret named `<prefix>-<registry-access-secret>` will be created automatically. Its value will be taken from 'container\_registry\_api\_key' if set, otherwise from 'ibmcloud\_api\_key'. |`string`|`null`| no |
68
+
| <aname="input_prefix"></a> [prefix](#input\_prefix)| Prefix appended to the container registry namespace and registry secret if created. |`string`|`null`| no |
62
69
| <aname="input_project_id"></a> [project\_id](#input\_project\_id)| The ID of the project where build will be created. |`string`| n/a | yes |
63
70
| <aname="input_region"></a> [region](#input\_region)| The region in which to provision the build. This must be the same region in which the code engine project was created. |`string`|`"us-south"`| no |
64
71
| <aname="input_source_context_dir"></a> [source\_context\_dir](#input\_source\_context\_dir)| The directory in the repository that contains the buildpacks file or the Dockerfile. |`string`|`null`| no |
65
72
| <aname="input_source_revision"></a> [source\_revision](#input\_source\_revision)| Commit, tag, or branch in the source repository to pull. |`string`|`null`| no |
66
-
| <aname="input_source_secret"></a> [source\_secret](#input\_source\_secret)| The name of the secret that is used access the repository source. If the var.source\_type value is `local`, this field must be omitted. |`string`|`null`| no |
67
-
| <aname="input_source_type"></a> [source\_type](#input\_source\_type)| Specifies the type of source to determine if your build source is in a repository or based on local source code. |`string`|`null`| no |
73
+
| <aname="input_source_secret"></a> [source\_secret](#input\_source\_secret)| The name of the secret that is used access the repository source. If the var.source\_type value is `local`, this input must be omitted. |`string`|`null`| no |
74
+
| <aname="input_source_type"></a> [source\_type](#input\_source\_type)| Specifies the type of source to determine if your build source is in a repository or based on local source code. If the value is `local`, then 'source\_secret' input must be omitted. |`string`|`null`| no |
68
75
| <aname="input_source_url"></a> [source\_url](#input\_source\_url)| The URL of the code repository. |`string`| n/a | yes |
69
76
| <aname="input_strategy_size"></a> [strategy\_size](#input\_strategy\_size)| The size for the build, which determines the amount of resources used. |`string`|`null`| no |
70
77
| <aname="input_strategy_spec_file"></a> [strategy\_spec\_file](#input\_strategy\_spec\_file)| The path to the specification file that is used for build strategies for building an image. |`string`|`null`| no |
71
-
| <aname="input_strategy_type"></a> [strategy\_type](#input\_strategy\_type)| The strategy to use for building the image. |`string`|n/a|yes|
78
+
| <aname="input_strategy_type"></a> [strategy\_type](#input\_strategy\_type)| The strategy to use for building the image. |`string`|`"dockerfile"`|no|
72
79
| <aname="input_timeout"></a> [timeout](#input\_timeout)| The maximum amount of time, in seconds, that can pass before the build must succeed or fail. |`number`|`600`| no |
0 commit comments