Visualizzazione delle aree di lavoro
Elenca gli spazi di lavoro del tuo account IBM Cloud® e, facoltativamente, mostra i dettagli del tuo spazio di lavoro.
IBM Cloud Schematics sta deprecando le vecchie versioni di Terraform e introducendo il supporto per le nuove versioni di Terraform. Per ulteriori informazioni, consultare il ciclo di vita della deprecazione di Schematics Terraform e il Programma di deprecazione.
Prima di iniziare
Assicurati che l'endpoint location e url puntino alla stessa regione quando elenchi le azioni e gli spazi di lavoro Schematics. Per ulteriori informazioni su ubicazione ed endpoint, vedi Dove sono memorizzate le tue informazioni?
Visualizzazione dello spazio di lavoro tramite UI
- Accedere alla consoleIBM Cloud.
- Fare clic sull'icona del menu
> Automazione della piattaforma > Schematics > Terraform.
- Ricerca con nome dello spazio di lavoro richiesto con specifico per l'ubicazione selezionando Nord America o Europa.
Verifica della visualizzazione dell'area di lavoro
- Fai clic sul tuo workspace elencato nella consoleIBM Cloud per visualizzarne i risultati.
Visualizzazione dello spazio di lavoro tramite CLI
-
Elenca gli spazi di lavoro del tuo account IBM Cloud e, facoltativamente, mostra i dettagli del tuo spazio di lavoro. Per ulteriori opzioni di configurazione quando si elenca lo spazio di lavoro, consultare il comando
ibmcloud schematics workspace list.Sintassi
ibmcloud schematics workspace list [--limit LIMIT] [--offset OFFSET] [--output] [--region] -
Verificare che lo spazio di lavoro sia aggiornato. Assicurati che il tuo spazio di lavoro sia in uno stato Inattivo.
ibmcloud schematics workspace list -
Fare riferimento a Gestione delle risorse cloud con Schematics per iniziare a creare, aggiornare o eliminare risorse cloud con Terraform.
Verifica dell'elenco di spazi di lavoro
Conferma i dettagli utilizzando l'aggiornamento del comando CLI dove i parametri del tuo spazio di lavoro sono stati aggiornati correttamente che è stato creato in precedenza.
```text {: screen}
ibmcloud schematics workspace list
Retrieving workspaces...
Name ID Description Version Status Frozen
workspacecos-module us-south.workspace.workspacecos-module.f39f5247 test-cos-module-workspace Terraform v1.0.11 TEMPLATE_ERROR False
testwspace03jan us-east.workspace.testwspace03jan.cf74cc48 terraform workspace updated successfully Terraform v1.0.11 INACTIVE True
teststagews-sleepy12 us-east.workspace.teststagews-sleepy12.a92d1471 terraform workspace stage test Terraform v1.0.11 INACTIVE False
newname us-east.workspace.test.fb3cc39b terraformworkspacetest Terraform v1.2.6 ACTIVE False
test-remote us-east.workspace.test-remote.455ecb7a terraform workspace Terraform v0.13.7 INACTIVE True
test-remote-msk us-east.workspace.test-remote-msk.bcbff09f terraform workspace Terraform v0.13.7 CONNECTING False
test-remote-msk-may18 us-east.workspace.test-remote-msk-may18.102cc13d terraform workspace Terraform v0.13.7 CONNECTING False
test-hpcs us-east.workspace.test-hpcs.fd2f331d Terraform v1.2.6 INACTIVE False
terraform_module1 us-east.workspace.terraform_module1.e7cb92a3 myblueprint Terraform v1.0.11 DRAFT False
terraform_module1 us-east.workspace.terraform_module1.a11f46b9 complex-delete Terraform v1.0.11 DRAFT False
terraform_module1 us-east.workspace.terraform_module1.647e4d4f myblueprint3 Terraform v1.0.11 DRAFT False
smulampa-wsgroup us-east.workspace.smulampa-wsgroup.95a4d82d Sample workspace testing Terraform v1.0.11 FAILED False
smulampa-schematics-agent-service-workspace us-east.workspace.smulampa-schematics-agent-service-workspace.6936524b schematics agents service workspace Terraform v1.0.11 DRAFT False
smulampa-cos-module-workspace us-east.workspace.smulampa-cos-module-workspace.b77841ac smulampa-cos-module-workspace Terraform v1.0.11 INACTIVE False
OK
```
In caso di aggiornamento riuscito, restituisce i dettagli aggiornati di un'area di lavoro esistente.
Per ulteriori informazioni, vedi sezione sulla risoluzione dei problemi.
Visualizzazione dell'elenco di spazi di lavoro tramite API
-
Segui i passi per recuperare il tuo token di accesso IAM e autenticarti con IBM Cloud Schematics utilizzando l'API.
-
Visualizzazione dei dettagli dell'elenco di tutti gli spazi di lavoro esistenti.
Esempio:
GET /v1/workspaces HTTP/1.1 Host: schematics.cloud.ibm.com Content-Type: application/json Authorization: <auth_token> Cache-Control: no-cache Postman-Token: b30e81a0-ae99-978c-c7e3-664371ddd1ea -
Verificare che lo spazio di lavoro sia elencato correttamente con l'elenco di tutti gli spazi di lavoro creati.
curl -X GET https://schematics.cloud.ibm.com/v1/workspaces -H "Authorization: <iam_access_token>" -
vedi Gestione delle risorse cloud con Schematics per iniziare a creare, aggiornare o eliminare risorse cloud con Terraform.
verifica dell'aggiornamento dello spazio di lavoro:
Verificare l'aggiornamento dello spazio di lavoro.
Verificare che l'aggiornamento dello spazio di lavoro sia stato eseguito correttamente come mostrato nell'output.
Output
{
"offset": 0,
"limit": 100,
"count": 2,
"workspaces": [
{
"id": "us-east.workspace.testwspace03jan.cf74cc48",
"name": "testwspace03jan",
"crn": "crn:v1:bluemix:public:schematics:us-south:a/1f7277194bb748cdb1d35fd8fb85a7cb:9ae7be42-0d59-415c-a6ce-0b662f520a4d:workspace:us-east.workspace.testwspace03jan.cf74cc48",
"type": [
"terraform_v1.4"
],
"description": "terraform workspace updated successfully",
"resource_group": "Default",
"location": "us-east",
"tags": [
"department:HR",
"application:compensation",
"environment:production"
],
"created_at": "2023-01-03T07:02:38.369965717Z",
"created_by": "test@in.ibm.com",
"status": "INACTIVE",
"failure_reason": "",
"workspace_status_msg": {
"status_code": "200",
"status_msg": ""
},
"workspace_status": {
"frozen": true,
"frozen_by": "test@in.ibm.com",
"frozen_at": "2023-01-05T13:44:32.400019282Z",
"locked": false
},
"template_repo": {
"url": "https://github.com/Anil-CM/newrepo",
"commit_id": "3dc60ea7fb30f236dbadfa817cf4beb5d337808d",
"full_url": "https://github.com/Anil-CM/newrepo",
"has_uploadedgitrepotar": false
},
"template_data": [
{
"id": "b44c147b-81fb-4e",
"folder": ".",
"compact": false,
"type": "terraform_v1.4",
"values_url": "https://us.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.testwspace03jan.cf74cc48/template_data/b44c147b-81fb-4e/values",
"values": "",
"values_metadata": [
{
"default": "testvpcone",
"description": "",
"name": "vpc_name",
"type": "string"
},
{
"default": "[\"tag:test1\", \"tag:test2\"]",
"description": "",
"name": "vpc_tags",
"type": "list(string)"
}
],
"variablestore": [
{
"name": "sample_var",
"secure": true,
"value": "$SCHEMATICSSECRET$04$.KMS04&crn:v1:bluemix:public:kms:us-south:a/c19ef85117044059a3be5e45d6dc1cf6:0de40d7c-085d-4373-9083-bbe598d7c3a9:key:4e6e436a-e53f-423d-848d-a7af60335c1f&crn:v1:bluemix:public:kms:us-east:a/c19ef85117044059a3be5e45d6dc1cf6:4d336da6-914a-4d17-8dc6-dfd9da51a422:key:1987a798-d933-446f-af49-3df7de755269&eyJjaXBoZXJ0ZXh0IjoiMitWZXYveFdRc3VKTi9obnAvYWtBT0dDL0NDK0pTOGJYWk5VWGg3RHRVU2JXbFc0Rkx6SjlGRzVWN1U9IiwiaXYiOiJMMjFzRXNSSXFSYXl1VWh0IiwidmVyc2lvbiI6IjQuMC4wIiwiaGFuZGxlIjoiMWQ0ZWE1ODItY2ZmOS00ZDQ3LWE3OGQtYWJjZmQ5NDM0MjA1In0=.15c9468cde760d8bfbacaeed.e0f233aa99d32be8a146dfe0d07db4721c021df5d8cda989d4064996abae4fe6d3d5f3692c754d53ba438548bbecef6c42810b4a",
"type": "",
"description": "Description of sample_var"
},
{
"name": "sleepy_time",
"secure": false,
"value": "15",
"type": "",
"description": ""
}
],
"has_githubtoken": false
}
],
"runtime_data": [
{
"id": "b44c147b-81fb-4e",
"engine_name": "terraform",
"engine_version": "v1.0.11",
"state_store_url": "https://us.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.testwspace03jan.cf74cc48/runtime_data/b44c147b-81fb-4e/state_store",
"log_store_url": "https://us.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.testwspace03jan.cf74cc48/runtime_data/b44c147b-81fb-4e/log_store"
}
],
"shared_data": {
"resource_group_id": ""
},
"applied_shareddata_ids": null,
"updated_by": "test@in.ibm.com",
"updated_at": "2023-01-05T13:44:32.483034358Z",
"last_health_check_at": "0001-01-01T00:00:00Z",
"cart_id": "",
"last_action_name": "WORKSPACE_UPDATE",
"last_activity_id": "a7aaa1ddb52edee56377d22b67c7478d",
"last_job": {
"job_id": "a7aaa1ddb52edee56377d22b67c7478d",
"job_name": "WORKSPACE_UPDATE",
"job_status": ""
}
},
{
"id": "us-east.workspace.teststagews-sleepy12.a92d1471",
"name": "teststagews-sleepy12",
"crn": "crn:v1:bluemix:public:schematics:us-south:a/1f7277194bb748cdb1d35fd8fb85a7cb:9ae7be42-0d59-415c-a6ce-0b662f520a4d:workspace:us-east.workspace.teststagews-sleepy12.a92d1471",
"type": [
"terraform_v1.4"
],
"description": "terraform workspace stage test",
"resource_group": "Default",
"location": "us-east",
"tags": [
"environment:staging"
],
"created_at": "2022-10-11T04:07:20.309871638Z",
"created_by": "Nishu.Bharti1@ibm.com",
"status": "INACTIVE",
"failure_reason": "",
"workspace_status_msg": {
"status_code": "200",
"status_msg": ""
},
"workspace_status": {
"frozen": false,
"locked": false
},
"template_repo": {
"url": "https://github.com/KshamaG/tf_cloudless_sleepy",
"branch": "v0.12",
"commit_id": "62b45f3a3501f6afa5d4c705abc04e474ff23fab",
"full_url": "https://github.com/KshamaG/tf_cloudless_sleepy/tree/v0.12",
"has_uploadedgitrepotar": false
},
"template_data": [
{
"id": "ff819de7-e084-4c",
"folder": "",
"compact": false,
"type": "terraform_v1.4",
"values_url": "https://us-east.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.teststagews-sleepy12.a92d1471/template_data/ff819de7-e084-4c/values",
"values": "",
"values_metadata": [
{
"default": "hello",
"description": "A sample_var to pass to the template.",
"name": "sample_var",
"type": "string"
},
{
"default": "0",
"description": "How long our local-exec takes a nap.",
"name": "sleepy_time",
"type": "string"
}
],
"variablestore": [
{
"name": "sample_var",
"secure": false,
"value": "THIS IS IBM CLOUD TERRAFORM CLI DEMO",
"type": "",
"description": "Description of sample_var"
},
{
"name": "sleepy_time",
"secure": false,
"value": "40",
"type": "string",
"description": ""
}
],
"has_githubtoken": false
}
],
"runtime_data": [
{
"id": "ff819de7-e084-4c",
"engine_name": "terraform",
"engine_version": "v1.0.11",
"state_store_url": "https://us-east.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.teststagews-sleepy12.a92d1471/runtime_data/ff819de7-e084-4c/state_store",
"log_store_url": "https://us-east.schematics.cloud.ibm.com/v1/workspaces/us-east.workspace.teststagews-sleepy12.a92d1471/runtime_data/ff819de7-e084-4c/log_store"
}
],
"shared_data": {
"resource_group_id": ""
},
"applied_shareddata_ids": null,
"updated_by": "Nishu.Bharti1@ibm.com",
"updated_at": "2022-10-11T04:24:24.168476128Z",
"last_health_check_at": "0001-01-01T00:00:00Z",
"cart_id": "",
"last_action_name": "WORKSPACE_CREATE",
"last_activity_id": "e27b2c73cad6571d4abee1092065076d",
"last_job": {
"job_id": "e27b2c73cad6571d4abee1092065076d",
"job_name": "WORKSPACE_CREATE",
"job_status": ""
}
},
]
}
Se l'elenco delle aree di lavoro ha esito positivo, restituisce l'elenco delle aree di lavoro.
Per ulteriori informazioni, vedi sezione sulla risoluzione dei problemi.
Visualizzazione dell'elenco di spazi di lavoro con Terraform
-
Segui i passi in Configurazione di Terraform per Schematics per creare il tuo spazio di lavoro con Terraform.
-
Vedere Gestione delle risorse cloud con Schematics per creare, aggiornare o eliminare risorse cloud con Terraform.
Passi successivi
La fase successiva del lavoro con gli spazi di lavoro è la distribuzione degli spazi di lavoro.