Uploaded image for project: 'Observability Documentation'
  1. Observability Documentation
  2. OBSDOCS-3167

Google Cloud storage with the STS wrong command structure

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Moderate

      • Current documentation looks:
        SERVICE_ACCOUNT_EMAIL=$(gcloud iam service-accounts create <iam_service_account_name> \  1 
            --display-name="Tempo Account" \
            --project <project_id>  \  2 
            --format='value(email)' \
            --quiet) 
        $ gcloud projects add-iam-policy-binding <project_id> \
            --member "serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
            --role "roles/storage.objectAdmin" 
        $ gcloud iam workload-identity-pools create-cred-config \
            "projects/<project_number>/locations/global/workloadIdentityPools/<pool_id>/providers/<provider_id>" \
            --service-account="$SERVICE_ACCOUNT_EMAIL" \
            --credential-source-file=/var/run/secrets/storage/serviceaccount/token \  1 
            --credential-source-type=text \
            --output-file=<output_file_path>  2 

         

      • In the above commands, the "- " signs are incorrectly placed below the "$" symbol.
      • However, they should be aligned parallel to the "oc" command, where the command begins.
      • Here is the updated look for all these code blocks:
      SERVICE_ACCOUNT_EMAIL=$(gcloud iam service-accounts create <iam_service_account_name> \  1 
      --display-name="Tempo Account" \
      --project <project_id>  \  2 
      --format='value(email)' \
      --quiet) 

       

      $ gcloud projects add-iam-policy-binding <project_id> \
        --member "serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
        --role "roles/storage.objectAdmin" 
      $ gcloud iam workload-identity-pools create-cred-config \
            "projects/<project_number>/locations/global/workloadIdentityPools/<pool_id>/providers/<provider_id>" \
        --service-account="$SERVICE_ACCOUNT_EMAIL" \
        --credential-source-file=/var/run/secrets/storage/serviceaccount/token \1 
        --credential-source-type=text \
        --output-file=<output_file_path> 

       

      • The commands will work as it is, but the structure is incorrect.
      • It should be a standard format all over the documentation. Hence, it needs to be changed.
      • I will raise a PR for this change and it get merged.

       

       

       

              Unassigned Unassigned
              rhn-support-pripatil Prithviraj Patil
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: