目标已由Autoscaler引用

我正在使用Google Deployment Manager,当我使用实例组pipe理器创build新的自动调节器时,出现此错误。

Unexpected response from resource of type compute.v1.autoscaler: 400 { "code": 400, "errors": [ { "domain": "global", "message": "Invalid value for field 'resource.target': 'https://www.googleapis.com/compute/v1/projects/XXX/zones/ZZZ/instanceGroupManagers/instance-group-manager'. Target already referenced by Autoscaler.", "reason": "invalid" } ], "message": "Invalid value for field 'resource.target': 'https://www.googleapis.com/compute/v1/projects/XXX/zones/ZZZ/instanceGroupManagers/instance-group-manager'. Target already referenced by Autoscaler.", "requestPath": "https://www.googleapis.com/compute/v1/projects/XXX/zones/ZZZ/autoscalers", "statusMessage": "Bad Request" } 

我不明白为什么,因为实例组pipe理器只在一个地方引用,在autoscalerconfiguration。 这是configuration:

 resources: - name: backend-igm type: compute.v1.instanceGroupManager properties: zone: ZZZ targetSize: 1 baseInstanceName: backend-instance instanceTemplate: https://www.googleapis.com/compute/v1/projects/XXX/global/instanceTemplates/my-template - name: backend-as type: compute.v1.autoscaler properties: zone: ZZZ target: $(ref.backend-igm.selfLink) autoscalingPolicy: minNumReplicas: 1 maxNumReplicas: 2 

此外,我首先关注了本教程: https : //cloud.google.com/deployment-manager/create-advanced-http-load-balanced-deployment

我看不出有什么区别可以解释这个错误。

你有什么想法吗?

感谢您的帮助

您可能已经通过云控制台或API调用创build了自动调节器,然后尝试将此自动调节器与通过Deployment Manager创build的实例托pipe组一起使用。

如果是这种情况,那么在通过Deployment Manager部署资源时,最好通过部署来部署所有资源。