Skip to content

Commit

Permalink
Code engine docs changes and example update (#4448)
Browse files Browse the repository at this point in the history
* Simplify CE examples

* Fix ce typos and align wording

* Add code_engine_app timeout docs

* Add code_engine default value docs

* Update .secrets.baseline

* Fix wrong resource ref in docs #4439
  • Loading branch information
michael-magrian authored Mar 30, 2023
1 parent e26d26e commit f45723c
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 130 deletions.
64 changes: 22 additions & 42 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.mod|go.sum|.*.map|^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-03-22T15:17:29Z",
"generated_at": "2023-03-29T09:49:02Z",
"plugins_used": [
{
"name": "ArtifactoryDetector"
Expand Down Expand Up @@ -704,7 +704,7 @@
"hashed_secret": "813274ccae5b6b509379ab56982d862f7b5969b6",
"is_secret": false,
"is_verified": false,
"line_number": 912,
"line_number": 919,
"type": "Base64 High Entropy String",
"verified_result": null
}
Expand All @@ -714,47 +714,47 @@
"hashed_secret": "9184b0c38101bf24d78b2bb0d044deb1d33696fc",
"is_secret": false,
"is_verified": false,
"line_number": 131,
"line_number": 132,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "c427f185ddcb2440be9b77c8e45f1cd487a2e790",
"is_secret": false,
"is_verified": false,
"line_number": 1428,
"line_number": 1437,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "1f7e33de15e22de9d2eaf502df284ed25ca40018",
"is_secret": false,
"is_verified": false,
"line_number": 1496,
"line_number": 1505,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "1f614c2eb6b3da22d89bd1b9fd47d7cb7c8fc670",
"is_secret": false,
"is_verified": false,
"line_number": 3310,
"line_number": 3335,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "7abfce65b8504403afc25c9790f358d513dfbcc6",
"is_secret": false,
"is_verified": false,
"line_number": 3323,
"line_number": 3348,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "0c2d85bf9a9b1579b16f220a4ea8c3d62b2e24b1",
"is_secret": false,
"is_verified": false,
"line_number": 3364,
"line_number": 3389,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -774,7 +774,7 @@
"hashed_secret": "da8cae6284528565678de15e03d461e23fe22538",
"is_secret": false,
"is_verified": false,
"line_number": 1587,
"line_number": 1712,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -784,15 +784,15 @@
"hashed_secret": "c8b6f5ef11b9223ac35a5663975a466ebe7ebba9",
"is_secret": false,
"is_verified": false,
"line_number": 1629,
"line_number": 1641,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "8abf4899c01104241510ba87685ad4de76b0c437",
"is_secret": false,
"is_verified": false,
"line_number": 1635,
"line_number": 1647,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -1046,7 +1046,7 @@
"hashed_secret": "c538565cf19589d92225a6c33dc5ed529b3213c2",
"is_secret": false,
"is_verified": false,
"line_number": 67,
"line_number": 111,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand Down Expand Up @@ -1084,7 +1084,7 @@
"hashed_secret": "3046d9f6cfaaeea6eed9bb7a4ab010fe49b0cfd4",
"is_secret": false,
"is_verified": false,
"line_number": 436,
"line_number": 441,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -1094,15 +1094,15 @@
"hashed_secret": "3046d9f6cfaaeea6eed9bb7a4ab010fe49b0cfd4",
"is_secret": false,
"is_verified": false,
"line_number": 88,
"line_number": 87,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b732fb611fd46a38e8667f9972e0cde777fbe37f",
"is_secret": false,
"is_verified": false,
"line_number": 444,
"line_number": 447,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -2396,7 +2396,7 @@
"hashed_secret": "b732fb611fd46a38e8667f9972e0cde777fbe37f",
"is_secret": false,
"is_verified": false,
"line_number": 1321,
"line_number": 1315,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -3342,23 +3342,23 @@
"hashed_secret": "f855f5027fd8fdb2df3f6a6f1cf858fffcbedb0c",
"is_secret": false,
"is_verified": false,
"line_number": 83022,
"line_number": 85021,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "5fb0fa884132a8724a8d7cba55853737e442adbd",
"is_secret": false,
"is_verified": false,
"line_number": 101012,
"line_number": 104155,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "1e5c2f367f02e47a8c160cda1cd9d91decbac441",
"is_secret": false,
"is_verified": false,
"line_number": 127376,
"line_number": 131088,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -3564,15 +3564,15 @@
"hashed_secret": "d47dcacc720a39e236679ac3e311a0d58bb6519e",
"is_secret": false,
"is_verified": false,
"line_number": 221,
"line_number": 223,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "e66e7d67fdf3c596c435fc7828b13205e4950a0f",
"is_secret": false,
"is_verified": false,
"line_number": 223,
"line_number": 225,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -4165,32 +4165,12 @@
"verified_result": null
}
],
"website/docs/r/code_engine_app.html.markdown": [
{
"hashed_secret": "5c5a15a8b0b3e154d77746945e563ba40100681b",
"is_secret": false,
"is_verified": false,
"line_number": 19,
"type": "Secret Keyword",
"verified_result": null
}
],
"website/docs/r/code_engine_build.html.markdown": [
{
"hashed_secret": "13d1b6063d3634acd0e4c0fb7361a5309c2483b0",
"is_secret": false,
"is_verified": false,
"line_number": 19,
"type": "Secret Keyword",
"verified_result": null
}
],
"website/docs/r/code_engine_job.html.markdown": [
{
"hashed_secret": "5c5a15a8b0b3e154d77746945e563ba40100681b",
"is_secret": false,
"is_verified": false,
"line_number": 18,
"line_number": 20,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
3 changes: 1 addition & 2 deletions examples/ibm-code-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ data "code_engine_project" "code_engine_project_instance" {
|------|-------------|------|---------|
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
| project_id | The ID of the project. | `string` | true |
| image_reference | 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`. | `string` | true |
| name | The name of the resource. | `string` | true |
| image_port | 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. | `number` | false |
| image_secret | Optional 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 app will be created but cannot reach the ready status, until this property is provided, too. | `string` | false |
Expand Down Expand Up @@ -140,7 +139,7 @@ data "code_engine_project" "code_engine_project_instance" {
| project_id | The ID of the project. | `string` | true |
| data | The key-value pair for the config map. Values must be specified in `KEY=VALUE` format. Each `KEY` field must consist of alphanumeric characters, `-`, `_` or `.` and must not be exceed a max length of 253 characters. Each `VALUE` field can consists of any character and must not be exceed a max length of 1048576 characters. | `map(string)` | false |
| project_id | The ID of the project. | `string` | true |
| image_reference | 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`. | `string` | true |
| image_reference | The name of the image that is used for this app/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`. | `string` | true |
| image_secret | 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. | `string` | false |
| run_arguments | 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. | `list(string)` | false |
| run_as_user | The user ID (UID) to run the application (e.g., 1001). | `number` | false |
Expand Down
2 changes: 1 addition & 1 deletion examples/ibm-code-engine/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variable "code_engine_project_name" {

// Resource arguments for code_engine_app
variable "code_engine_app_image_reference" {
description = "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`."
description = "The name of the image that is used for this app. 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`."
type = string
default = "icr.io/codeengine/helloworld"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func DataSourceIbmCodeEngineProject() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the project was created.",
Description: "The timestamp when the project was created.",
},
"crn": &schema.Schema{
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions ibm/service/codeengine/resource_ibm_code_engine_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func ResourceIbmCodeEngineApp() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validate.InvokeValidator("ibm_code_engine_app", "image_reference"),
Description: "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`.",
Description: "The name of the image that is used for this app. 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`.",
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down Expand Up @@ -230,12 +230,12 @@ func ResourceIbmCodeEngineApp() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the resource was created.",
Description: "The timestamp when the resource was created.",
},
"endpoint": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "Optional URL to invoke app. Depending on visibility this is accessible publicly ot in the private network only. Empty in case 'managed_domain_mappings' is set to 'local'.",
Description: "Optional URL to invoke app. Depending on visibility this is accessible publicly or in the private network only. Empty in case 'managed_domain_mappings' is set to 'local'.",
},
"endpoint_internal": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/codeengine/resource_ibm_code_engine_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func ResourceIbmCodeEngineBuild() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the resource was created.",
Description: "The timestamp when the resource was created.",
},
"entity_tag": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ResourceIbmCodeEngineConfigMap() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the resource was created.",
Description: "The timestamp when the resource was created.",
},
"entity_tag": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/codeengine/resource_ibm_code_engine_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func ResourceIbmCodeEngineJob() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the resource was created.",
Description: "The timestamp when the resource was created.",
},
"entity_tag": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/codeengine/resource_ibm_code_engine_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func ResourceIbmCodeEngineProject() *schema.Resource {
"created_at": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The date when the project was created.",
Description: "The timestamp when the project was created.",
},
"crn": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/code_engine_project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In addition to all argument references listed, you can access the following attr
* `id` - The unique identifier of the code_engine_project.
* `account_id` - (String) An alphanumeric value identifying the account ID.

* `created_at` - (String) The date when the project was created.
* `created_at` - (String) The timestamp when the project was created.

* `crn` - (String) The CRN of the project.

Expand Down
Loading

0 comments on commit f45723c

Please sign in to comment.