Created
March 14, 2020 17:19
-
-
Save nibalizer/1345227718fac0ee7158fbe41c185ec8 to your computer and use it in GitHub Desktop.
Script fragments for manual tagging resources in IBM Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#source ../local.env | |
# apache2.0 license | |
#ibmcloud target -g $RESOURCE_GROUP_NAME | |
#IAM_TOKEN=$(ibmcloud iam oauth-tokens | grep IAM | awk '{print $4}') | |
#CLUSTER_CRN=$(ibmcloud ks cluster get --cluster $CLUSTER_NAME_PREFIX$i --json | jq -r .crn) | |
#CLUSTER_CRN=$CRN | |
curl \ | |
-s \ | |
-X GET \ | |
-H 'Content-Type: application/json' \ | |
-H 'Authorization: bearer '$IAM_TOKEN'' \ | |
-H 'Accept: application/json' \ | |
"https://tags.global-search-tagging.cloud.ibm.com/v3/tags/?providers=ghost&attached_to=${CLUSTER_CRN}" | |
# --data '{"tag_name": "'$FILTER_TAG'", "resources": [{ "resource_id": "'$CLUSTER_CRN'"}]}' \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment