Skip to content

Commit

Permalink
docs(codeengine): Updated some code engine documentation for clarific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
John Sartore authored and hkantare committed Mar 24, 2024
1 parent 08e47de commit b3bc409
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
30 changes: 17 additions & 13 deletions website/docs/r/code_engine_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subcategory: "Code Engine"

# ibm_code_engine_app

Provides a resource for code_engine_app. This allows code_engine_app to be created, updated and deleted.
Create, update, and delete code_engine_apps with this resource.

## Example Usage

Expand All @@ -23,6 +23,12 @@ resource "ibm_code_engine_app" "code_engine_app_instance" {
name = "name"
value = "value"
}
run_env_variables {
type = "secret_full_reference"
name = "secret_env_var"
reference = "secret_name"
}
}
```

Expand All @@ -35,7 +41,7 @@ code_engine_app provides the following [Timeouts](https://www.terraform.io/docs/

## Argument Reference

Review the argument reference that you can specify for your resource.
You can specify the following arguments for this resource.

* `image_port` - (Optional, Integer) Optional port the app listens on. While the app will always be exposed via port `443` for end users, this port is used to connect to the port that is exposed by the container image.
* Constraints: The default value is `8080`.
Expand All @@ -45,16 +51,17 @@ Review the argument reference that you can specify for your resource.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z0-9]([\\-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([\\-a-z0-9]*[a-z0-9])?)*$/`.
* `managed_domain_mappings` - (Optional, String) Optional value controlling which of the system managed domain mappings will be setup for the application. Valid values are 'local_public', 'local_private' and 'local'. Visibility can only be 'local_private' if the project supports application private visibility.
* Constraints: The default value is `local_public`. Allowable values are: `local`, `local_private`, `local_public`.
* `name` - (Required, String) The name of the app. Use a name that is unique within the project.
* `name` - (Required, Forces new resource, String) The name of the app. Use a name that is unique within the project.
* Constraints: The maximum length is `63` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z]([-a-z0-9]*[a-z0-9])?$/`.
* `project_id` - (Required, Forces new resource, String) The ID of the project.
* Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/`.
* `run_arguments` - (Optional, List) Optional arguments for the app that are passed to start the container. If not specified an empty string array will be applied and the arguments specified by the container image, will be used to start the container.
* Constraints: The list items must match regular expression `/^.*$/`. The maximum length is `100` items. The minimum length is `0` items.
* `run_as_user` - (Optional, Integer) Optional user ID (UID) to run the app (e.g., `1001`).
* Constraints: The default value is `0`.
* `run_commands` - (Optional, List) Optional commands for the app that are passed to start the container. If not specified an empty string array will be applied and the command specified by the container image, will be used to start the container.
* Constraints: The list items must match regular expression `/^.*$/`. The maximum length is `100` items. The minimum length is `0` items.
* `run_env_variables` - (Optional, List) Optional references to config maps, secrets or a literal values that are exposed as environment variables within the running application.
* `run_env_variables` - (Optional, List) Optional references to config maps, secrets or literal values that are exposed as environment variables within the running application.
* Constraints: The maximum length is `100` items. The minimum length is `0` items.
Nested scheme for **run_env_variables**:
* `key` - (Optional, String) The key to reference as environment variable.
Expand All @@ -66,7 +73,7 @@ Nested scheme for **run_env_variables**:
* `reference` - (Optional, String) The name of the secret or config map.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z0-9]([\\-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([\\-a-z0-9]*[a-z0-9])?)*$/`.
* `type` - (Optional, String) Specify the type of the environment variable.
* Constraints: The default value is `literal`. Allowable values are: `literal`, `config_map_full_reference`, `secret_full_reference`, `config_map_key_reference`, `secret_key_reference`. The value must match regular expression `/^(literal|config_map_full_reference|secret_full_reference|config_map_key_reference|secret_key_reference)$/`.
* Constraints: The default value is `literal`. Allowable values are: `literal`, `config_map_full_reference`, `secret_full_reference`, `config_map_key_reference`, `secret_key_reference`. The value must match regular expression `/^(literal|config_map_full_reference|secret_full_reference|config_map_key_reference|secret_key_reference)$/`. When referencing a secret or configmap, the `reference` must be specified. When referencing a secret or configmap key, a `key` must also be specified.
* `value` - (Optional, String) The literal value of the environment variable.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[\\-._a-zA-Z0-9]+$/`.
* `run_service_account` - (Optional, String) Optional name of the service account. For built-in service accounts, you can use the shortened names `manager` , `none`, `reader`, and `writer`.
Expand All @@ -83,10 +90,12 @@ Nested scheme for **run_volume_mounts**:
* `type` - (Required, String) Specify the type of the volume mount. Allowed types are: 'config_map', 'secret'.
* Constraints: The default value is `secret`. Allowable values are: `config_map`, `secret`. The value must match regular expression `/^(config_map|secret)$/`.
* `scale_concurrency` - (Optional, Integer) Optional maximum number of requests that can be processed concurrently per instance.
* Constraints: The default value is `100`.
* Constraints: The default value is `100`.
* `scale_concurrency_target` - (Optional, Integer) Optional threshold of concurrent requests per instance at which one or more additional instances are created. Use this value to scale up instances based on concurrent number of requests. This option defaults to the value of the `scale_concurrency` option, if not specified.
* `scale_cpu_limit` - (Optional, String) Optional number of CPU set for the instance of the app. For valid values see [Supported memory and CPU combinations](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo).
* Constraints: The default value is `1`. The maximum length is `10` characters. The minimum length is `0` characters. The value must match regular expression `/^([0-9.]+)([eEinumkKMGTPB]*)$/`.
* `scale_down_delay` - (Optional, Integer) Optional amount of time in seconds that delays the scale down behavior for an app instance.
* Constraints: The default value is `0`. The maximum value is `3600`. The minimum value is `0`.
* `scale_ephemeral_storage_limit` - (Optional, String) Optional amount of ephemeral storage to set for the instance of the app. The amount specified as ephemeral storage, must not exceed the amount of `scale_memory_limit`. The units for specifying ephemeral storage are Megabyte (M) or Gigabyte (G), whereas G and M are the shorthand expressions for GB and MB. For more information see [Units of measurement](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo#unit-measurements).
* Constraints: The default value is `400M`. The maximum length is `10` characters. The minimum length is `0` characters. The value must match regular expression `/^([0-9.]+)([eEinumkKMGTPB]*)$/`.
* `scale_initial_instances` - (Optional, Integer) Optional initial number of instances that are created upon app creation or app update.
Expand All @@ -102,7 +111,7 @@ Nested scheme for **run_volume_mounts**:

## Attribute Reference

In addition to all argument references listed, you can access the following attribute references after your resource is created.
After your resource is created, you can read values from the listed arguments and the following attributes.

* `id` - The unique identifier of the code_engine_app.
* `app_id` - (String) The identifier of the resource.
Expand All @@ -117,7 +126,7 @@ In addition to all argument references listed, you can access the following attr
* `resource_type` - (String) The type of the app.
* Constraints: Allowable values are: `app_v2`.
* `status` - (String) The current status of the app.
* Constraints: Possible values are: `ready`, `deploying`, `failed`, `warning`.
* Constraints: Allowable values are: `ready`, `deploying`, `failed`, `warning`.
* `status_details` - (List) The detailed status of the application.
Nested scheme for **status_details**:
* `latest_created_revision` - (String) Latest app revision that has been created.
Expand All @@ -141,8 +150,3 @@ The `name` property can be formed from `project_id`, and `name` in the following
```
$ terraform import ibm_code_engine_app.code_engine_app <project_id>/<name>
```

# Example
```
$ terraform import ibm_code_engine_app.code_engine_app "15314cc3-85b4-4338-903f-c28cdee6d005/my-app"
```
2 changes: 1 addition & 1 deletion website/docs/r/code_engine_binding.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subcategory: "Code Engine"

# ibm_code_engine_binding

Create, update, and delete code_engine_bindings with this resource.
Create, update, and delete code_engine_bindings with this resource. A `secret` with format `service_access` is required to create a binding.

## Example Usage

Expand Down
28 changes: 15 additions & 13 deletions website/docs/r/code_engine_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subcategory: "Code Engine"

# ibm_code_engine_job

Provides a resource for code_engine_job. This allows code_engine_job to be created, updated and deleted.
Create, update, and delete code_engine_job with this resource.

## Example Usage

Expand All @@ -23,27 +23,34 @@ resource "ibm_code_engine_job" "code_engine_job_instance" {
name = "name"
value = "value"
}
run_env_variables {
type = "secret_full_reference"
name = "secret_env_var"
reference = "secret_name"
}
}
```

## Argument Reference

Review the argument reference that you can specify for your resource.
You can specify the following arguments for this resource.

* `image_reference` - (Required, String) The name of the image that is used for this job. The format is `REGISTRY/NAMESPACE/REPOSITORY:TAG` where `REGISTRY` and `TAG` are optional. If `REGISTRY` is not specified, the default is `docker.io`. If `TAG` is not specified, the default is `latest`. If the image reference points to a registry that requires authentication, make sure to also specify the property `image_secret`.
* Constraints: The maximum length is `256` characters. The minimum length is `1` character. The value must match regular expression `/^([a-z0-9][a-z0-9\\-_.]+[a-z0-9][\/])?([a-z0-9][a-z0-9\\-_]+[a-z0-9][\/])?[a-z0-9][a-z0-9\\-_.\/]+[a-z0-9](:[\\w][\\w.\\-]{0,127})?(@sha256:[a-fA-F0-9]{64})?$/`.
* `image_secret` - (Optional, String) The name of the image registry access secret. The image registry access secret is used to authenticate with a private registry when you download the container image. If the image reference points to a registry that requires authentication, the job / job runs will be created but submitted job runs will fail, until this property is provided, too. This property must not be set on a job run, which references a job template.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z0-9]([\\-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([\\-a-z0-9]*[a-z0-9])?)*$/`.
* `name` - (Required, String) The name of the job. Use a name that is unique within the project.
* `name` - (Required, Forces new resource, String) The name of the job. Use a name that is unique within the project.
* Constraints: The maximum length is `63` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z0-9]([\\-a-z0-9]*[a-z0-9])?$/`.
* `project_id` - (Required, Forces new resource, String) The ID of the project.
* Constraints: The maximum length is `36` characters. The minimum length is `36` characters. The value must match regular expression `/^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/`.
* `run_arguments` - (Optional, List) Set arguments for the job that are passed to start job run containers. If not specified an empty string array will be applied and the arguments specified by the container image, will be used to start the container.
* Constraints: The list items must match regular expression `/^.*$/`. The maximum length is `100` items. The minimum length is `0` items.
* `run_as_user` - (Optional, Integer) The user ID (UID) to run the application (e.g., 1001).
* `run_as_user` - (Optional, Integer) The user ID (UID) to run the job (e.g., 1001).
* Constraints: The default value is `0`.
* `run_commands` - (Optional, List) Set commands for the job that are passed to start job run containers. If not specified an empty string array will be applied and the command specified by the container image, will be used to start the container.
* Constraints: The list items must match regular expression `/^.*$/`. The maximum length is `100` items. The minimum length is `0` items.
* `run_env_variables` - (Optional, List) Optional references to config maps, secrets or a literal values.
* `run_env_variables` - (Optional, List) Optional references to config maps, secrets or literal values.
* Constraints: The maximum length is `100` items. The minimum length is `0` items.
Nested scheme for **run_env_variables**:
* `key` - (Optional, String) The key to reference as environment variable.
Expand All @@ -55,10 +62,10 @@ Nested scheme for **run_env_variables**:
* `reference` - (Optional, String) The name of the secret or config map.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[a-z0-9]([\\-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([\\-a-z0-9]*[a-z0-9])?)*$/`.
* `type` - (Optional, String) Specify the type of the environment variable.
* Constraints: The default value is `literal`. Allowable values are: `literal`, `config_map_full_reference`, `secret_full_reference`, `config_map_key_reference`, `secret_key_reference`. The value must match regular expression `/^(literal|config_map_full_reference|secret_full_reference|config_map_key_reference|secret_key_reference)$/`.
* Constraints: The default value is `literal`. Allowable values are: `literal`, `config_map_full_reference`, `secret_full_reference`, `config_map_key_reference`, `secret_key_reference`. The value must match regular expression `/^(literal|config_map_full_reference|secret_full_reference|config_map_key_reference|secret_key_reference)$/`. When referencing a secret or configmap, the `reference` must be specified. When referencing a secret or configmap key, a `key` must also be specified.
* `value` - (Optional, String) The literal value of the environment variable.
* Constraints: The maximum length is `253` characters. The minimum length is `1` character. The value must match regular expression `/^[\\-._a-zA-Z0-9]+$/`.
* `run_mode` - (Optional, String) The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `scale_max_execution_time` and `scale_retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted indefinitely, the `scale_max_execution_time` and `scale_retry_limit` properties are not allowed.
* `run_mode` - (Optional, String) The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `max_execution_time` and `retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted indefinitely, the `max_execution_time` and `retry_limit` properties are not allowed.
* Constraints: The default value is `task`. Allowable values are: `task`, `daemon`. The minimum length is `0` characters. The value must match regular expression `/^(task|daemon)$/`.
* `run_service_account` - (Optional, String) The name of the service account. For built-in service accounts, you can use the shortened names `manager`, `none`, `reader`, and `writer`. This property must not be set on a job run, which references a job template.
* Constraints: The default value is `default`. Allowable values are: `default`, `manager`, `reader`, `writer`, `none`. The minimum length is `0` characters. The value must match regular expression `/^(manager|reader|writer|none|default)$/`.
Expand Down Expand Up @@ -88,7 +95,7 @@ Nested scheme for **run_volume_mounts**:

## Attribute Reference

In addition to all argument references listed, you can access the following attribute references after your resource is created.
After your resource is created, you can read values from the listed arguments and the following attributes.

* `id` - The unique identifier of the code_engine_job.
* `job_id` - (String) The identifier of the resource.
Expand Down Expand Up @@ -117,8 +124,3 @@ The `name` property can be formed from `project_id`, and `name` in the following
```
$ terraform import ibm_code_engine_job.code_engine_job <project_id>/<name>
```

# Example
```
$ terraform import ibm_code_engine_job.code_engine_job "15314cc3-85b4-4338-903f-c28cdee6d005/my-job"
```

0 comments on commit b3bc409

Please sign in to comment.