Skip to content

Simplify command for enabling Google Cloud Services in DDG#19

Merged
ncurrie3 merged 1 commit intogoogle:mainfrom
BarefootCoders:fix-ddg-gcloud-service-enable-command
Apr 15, 2026
Merged

Simplify command for enabling Google Cloud Services in DDG#19
ncurrie3 merged 1 commit intogoogle:mainfrom
BarefootCoders:fix-ddg-gcloud-service-enable-command

Conversation

@Jberlinsky
Copy link
Copy Markdown
Contributor

The existing command to enable *.googleapis.com in the DDG does not work as expected in Cloud Shell due to conflict between the -I and -n1 flags:

jason@cloudshell:~ (initial-project-bfc-stellar)$ echo "iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads cloudbilling logging iamcredentials orgpolicy" | xargs -n1 -I {} gcloud services enable "{}.googleapis.com"
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
ERROR: (gcloud.services.enable) PERMISSION_DENIED: Not found or permission denied for service(s): iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads cloudbilling logging iamcredentials orgpolicy.googleapis.com.
Help Token: AVnrbfmsTEevSFSwLfl6nE2ahEtTpyBbh5Jg-fY7clGBTr7ve-gFg8ld07Un99vSg_6n0BcZq7yLF8Lkat_9Rv8fvMkXq_dtMVBr7r37M0Sv3uXF. This command is authenticated as jason@barefootcoders.com which is the active account specified by the [core/account] property
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
  violations:
  - subject: ?error_code=220002&services=iam+cloudkms+pubsub+serviceusage+cloudresourcemanager+bigquery+assuredworkloads+cloudbilling+logging+iamcredentials+orgpolicy.googleapis.com
    type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo
  domain: serviceusage.googleapis.com
  metadata:
    services: iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads
      cloudbilling logging iamcredentials orgpolicy.googleapis.com
  reason: SERVICE_CONFIG_NOT_FOUND_OR_PERMISSION_DENIED

This simplifies the command using Bash brace expansion.

The existing command to enable `*.googleapis.com` in the DDG does not work as expected in Cloud Shell due to conflict between the `-I` and `-n1` flags:

```
jason@cloudshell:~ (initial-project-bfc-stellar)$ echo "iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads cloudbilling logging iamcredentials orgpolicy" | xargs -n1 -I {} gcloud services enable "{}.googleapis.com"
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
ERROR: (gcloud.services.enable) PERMISSION_DENIED: Not found or permission denied for service(s): iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads cloudbilling logging iamcredentials orgpolicy.googleapis.com.
Help Token: AVnrbfmsTEevSFSwLfl6nE2ahEtTpyBbh5Jg-fY7clGBTr7ve-gFg8ld07Un99vSg_6n0BcZq7yLF8Lkat_9Rv8fvMkXq_dtMVBr7r37M0Sv3uXF. This command is authenticated as jason@barefootcoders.com which is the active account specified by the [core/account] property
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
  violations:
  - subject: ?error_code=220002&services=iam+cloudkms+pubsub+serviceusage+cloudresourcemanager+bigquery+assuredworkloads+cloudbilling+logging+iamcredentials+orgpolicy.googleapis.com
    type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo
  domain: serviceusage.googleapis.com
  metadata:
    services: iam cloudkms pubsub serviceusage cloudresourcemanager bigquery assuredworkloads
      cloudbilling logging iamcredentials orgpolicy.googleapis.com
  reason: SERVICE_CONFIG_NOT_FOUND_OR_PERMISSION_DENIED
```

This simplifies the command using Bash brace expansion.
@ncurrie3 ncurrie3 self-requested a review April 15, 2026 17:01
Copy link
Copy Markdown
Member

@ncurrie3 ncurrie3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :) @Jberlinsky

@ncurrie3 ncurrie3 merged commit f081675 into google:main Apr 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants