Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Create deployment resource is giving error 400 can some help to examine what is going wrong

curl -X POST 'https://www.googleapis.com/deploymentmanager/v2/projects/[PROJECT_NAME]/global/deployments' -d '{
"name": "example-config-with-templates",
"target": {
"config": {
"content": "resources:\n- name: vm-created-by-cloud-config\n type: compute.v1.instance\n properties:\n zone: us-central1-a\n machineType: https://www.googleapis.com/compute/v1/projects/[PROJECT_NAME]/zones/us-central1-a/machineTypes/n1-st...n disks:\n - deviceName: boot\n type: PERSISTENT\n boot: true\n autoDelete: true\n initializeParams:\n diskName: disk-created-by-cloud-config\n sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-11\n networkInterfaces:\n - network: https://www.googleapis.com/compute/v1/projects/[PROJECT_NAME]/global/networks/default\n accessConfigs:\n - name: External NAT\n type: ONE_TO_ONE_NAT"
}
}
}' --header 'Authorization: Bearer T O K E N' --compressed

=======

 

 

 

The curl command above gives below error:
{
"error": {
"code": 400,
"message": "Required field 'resource' not specified",
"errors": [
{
"message": "Required field 'resource' not specified",
"domain": "global",
"reason": "required"
}
]
}
}



0 REPLIES 0