title: Deployment Manager Failed to Update Bucket Name
body: <p>I'm using the exact same template as the example <a href="https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/tree/master/dm/templates/gcs_bucket" rel="nofollow noreferrer">template</a>.
  I first deploy the template with bucket name X:</p>
  <pre><code>imports:
    - path: templates/gcs_bucket/gcs_bucket.py
      name: gcs_bucket.py
  
  resources:
    - name: X
      type: gcs_bucket.py
      properties:
        name: X
        location: us-east1
        versioning:
          enabled: True
        labels:
          env: development
  </code></pre>
  <pre><code>gcloud deployment-manager deployments create s3-sample --config gcs_bucket.yaml
  </code></pre>
  <p>which runs successfully.</p>
  <p>Next, I tried to deploy using the same template but changing the bucket name to: Y</p>
  <pre><code>imports:
    - path: templates/gcs_bucket/gcs_bucket.py
      name: gcs_bucket.py
  
  resources:
    - name: Y
      type: gcs_bucket.py
      properties:
        name: Y
        location: us-east1
        versioning:
          enabled: True
        labels:
          env: development
  </code></pre>
  <p>With the update command</p>
  <pre><code>gcloud deployment-manager deployments create s3-sample --config gcs_bucket.yaml
  </code></pre>
  <p>It failed with</p>
  <pre><code>Waiting for update [operation-1596317964460-5abd7bd3863a0-46f678bb-c6e8f7f7]...failed.                                                                                                                                                        
  ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1596317964460-5abd7bd3863a0-46f678bb-c6e8f7f7]: errors:
  - code: RESOURCE_ERROR
    location: /deployments/s3-sample/resources/X
    message: '{&quot;ResourceType&quot;:&quot;gcp-types/storage-v1:buckets&quot;,&quot;ResourceErrorCode&quot;:&quot;403&quot;,&quot;ResourceErrorMessage&quot;:{&quot;code&quot;:403,&quot;errors&quot;:[{&quot;domain&quot;:&quot;global&quot;,&quot;message&quot;:&quot;XXX@cloudservices.gserviceaccount.com
      does not have storage.buckets.get access to the Google Cloud Storage bucket.&quot;,&quot;reason&quot;:&quot;forbidden&quot;}],&quot;message&quot;:&quot;XXX@cloudservices.gserviceaccount.com
      does not have storage.buckets.get access to the Google Cloud Storage bucket.&quot;,&quot;statusMessage&quot;:&quot;Forbidden&quot;,&quot;requestPath&quot;:&quot;https://storage.googleapis.com/storage/v1/b/X&quot;,&quot;httpMethod&quot;:&quot;GET&quot;,&quot;suggestion&quot;:&quot;Consider
      granting permissions to XXX@cloudservices.gserviceaccount.com&quot;}}'
  </code></pre>
  <p>But the bucket Y was created successfully and the bucket X was not deleted?
  What did I do wrong?
  I tried the update command again after deleting the X bucket, and it worked.</p>