Estou tentando criar um compute.v1.instanceTemplate
com o Deployment Manager (v2), mas estou recebendo o seguinte erro:
Unexpected response from resource of type compute.v1.instanceTemplate: 400 {statusMessage=Bad Request, errors=[{message=Invalid value for field 'resource.properties': ''. Instance Templates must provide instance properties., domain=global, reason=invalid}]}
Suponho que esteja reclamando de uma propriedade perdida, mas não posso, para minha vida, descobrir qual deles pode ser. Analisamos o recurso
InstanceTemplates e o
Desenvolvimento avançado , e eu não pareço estar faltando nada. Eu ficaria feliz em ser provado errado, no entanto.
Este é o recurso completo adquirido com gcloud deployment-manager deployments describe --log-http name
:
{
"id": "redacted",
"insertTime": "2015-10-03T05:13:33.325-07:00",
"updateTime": "2015-10-03T05:42:50.152-07:00",
"name": "tpl-redacted",
"type": "compute.v1.instanceTemplate",
"update": {
"manifest": "https://www.googleapis.com/deploymentmanager/v2/projects/project-redacted/global/deployments/redacted/manifests/manifest-redacted",
"error": {
"errors": [
{
"code": "RESOURCE_ERROR",
"location": "redacted/tpl-redacted",
"message": "Unexpected response from resource of type compute.v1.instanceTemplate: 400 {statusMessage=Bad Request, errors=[{message=Invalid value for field 'resource.properties': ''. Instance Templates must provide instance properties., domain=global, reason=invalid}]}"
}
]
},
"state": "FAILED",
"intent": "CREATE_OR_ACQUIRE",
"properties": "canIpForward: true\ndisks:\n- autoDelete: true\n boot: true\n deviceName: boot\n initializeParams:\n diskSizeGb: 10\n diskType: pd-standard\n sourceImage: https://www.googleapis.com/compute/v1/projects/project-redacted/global/images/redacted-image\n mode: READ_WRITE\n type: PERSISTENT\nmachineType: https://www.googleapis.com/compute/v1/projects/project-redacted/zones/asia-east1-c/machineTypes/g1-small\nnetworkInterfaces:\n- accessConfigs: []\n network: $(ref.nw-redacted.selfLink)\nscheduling:\n automaticRestart: true\n onHostMaintenance: MIGRATE\nserviceAccounts:\n- scopes:\n - storage-ro\ntags:\n items:\n - redacted\nzone: asia-east1-c\n",
"finalProperties": "canIpForward: true\ndisks:\n- autoDelete: true\n boot: true\n deviceName: boot\n initializeParams:\n diskSizeGb: 10\n diskType: pd-standard\n sourceImage: https://www.googleapis.com/compute/v1/projects/project-redacted/global/images/redacted-image\n mode: READ_WRITE\n type: PERSISTENT\nmachineType: https://www.googleapis.com/compute/v1/projects/project-redacted/zones/asia-east1-c/machineTypes/g1-small\nnetworkInterfaces:\n- accessConfigs: []\n network: https://www.googleapis.com/compute/v1/projects/project-redacted/global/networks/nw-redacted\nscheduling:\n automaticRestart: true\n onHostMaintenance: MIGRATE\nserviceAccounts:\n- scopes:\n - storage-ro\ntags:\n items:\n - redacted\nzone: asia-east1-c\n"
}
}
E aqui está uma versão mais amigável para o ser humano de finalProperties
:
canIpForward: true
disks:
- autoDelete: true
boot: true
deviceName: boot
initializeParams:
diskSizeGb: 10
diskType: pd-standard
sourceImage: https://www.googleapis.com/compute/v1/projects/project-redacted/global/images/redacted-image
mode: READ_WRITE
type: PERSISTENT
machineType: https://www.googleapis.com/compute/v1/projects/project-redacted/zones/asia-east1-c/machineTypes/g1-small
networkInterfaces:
- accessConfigs: []
network: https://www.googleapis.com/compute/v1/projects/project-redacted/global/networks/nw-redacted
scheduling:
automaticRestart: true
onHostMaintenance: MIGRATE
serviceAccounts:
- scopes:
- storage-ro
tags:
items:
- redacted
zone: asia-east1-c
Alguma ideia? Alternativamente, exemplos de implementações bem-sucedidas de compute.v1.instanceTemplate
seriam muito apreciados.