0

I use Deployment Manager and try to describe my resources in python files ( Deployment Manager allows to create configuration using Python or Jinja). Actually,

I use json-format for topic-resource's creating -

return
{ 
    'name': topic, 
    'type': 'pubsub.v1.topic',
    'properties': { 
        'topic': topic 
    },
    'accessControl': {
        'gcpIamPolicy': { 
            'bindings': [ 
                { 
                    'role': 
                    'roles/pubsub.publisher',
                    'members': [ 'service_account = project_name + '@gs-project-accounts.iam.gserviceaccount.com' ]
                } 
            ] 
        }  
    }
}

The format [project_name]@gs-project-accounts.iam.gserviceaccount.com worked fine several weeks ago but for new created project such service account is not found.

  1. Is it correct that format of Google Cloud Storage service accounts was changed for a new created project it is failure service account ... doesn't exist? It was - [project-name]@gs-project-accounts.iam.gserviceaccount.com, and currently it is service-[projectId]@gs-project-accounts.iam.gserviceaccount.com. I check it by this API and for special new-created projects I get - this format : service-[project_Id]@gs-project-accounts.iam.gserviceaccount.com.

  2. How we can fetch the google cloud storage service account dynamically in Deployment Manager config files? As I can see here there are only several environment variables like project_name, project_id, time etc. and there isn't any storage_service_account environment variable

1 Answer 1

1

The GCS service account format recently changed to the following format:

service-[PROJECT_NUMBER]@gs-project-accounts.iam.gserviceaccount.com

Existing projects will continue to work with the previous format.

For new projects, the new format will be the way moving forward.

To verify format you can get projects.serviceAccount.

4
  • Frank, thanks for the answer, could you please add some link to release note or documentation about this format changing? Commented Jul 16, 2018 at 14:57
  • The update if not out already should be coming soon. I'll check-in with the team today and report back. Commented Jul 16, 2018 at 15:01
  • actually it did not alias new->old, as you mentioned above. Commented Jul 20, 2018 at 16:40
  • Need to fix that, thanks for calling that out Nazar that isn't ready yet. Commented Jul 20, 2018 at 16:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.