This tool support the following policies: policy
cost_explorer: Get data from cost explorer and upload to ElasticSearch
tag_resources: Tag IBM resources list of supported IBM Resources
Environment Variables required:
KeyName | Value | Description |
---|---|---|
IBM_CUSTOM_TAGS_LIST | string | pass string with separated with comma. i.e: “cost-center: test, env: test” |
RESOURCE_TO_TAG (optional) | string | pass the resource name to tag. ex: virtual_servers |
IBM_CLOUD_API_KEY | string | IBM Cloud API Key |
IBM_API_KEY | string | IBM Classic infrastructure key ( SoftLayer ) |
IBM_API_USERNAME | string | IBM API Username ( SoftLayer ) |
IBM_ACCOUNT_ID | string | IBM Account Id |
# Run tag_resources policy in IBM Cloud
podman run --rm --name cloud-governance \
-e PUBLIC_CLOUD_NAME="IBM" \
-e policy="tag_resources" \
-e account="${ACCOUNT_NAME}" \
-e IBM_CLOUD_API_KEY="${IBM_CLOUD_API_KEY}" \
-e IBM_CUSTOM_TAGS_LIST="cost-center:675, env:test" \
-e IBM_ACCOUNT_ID="${IBM_ACCOUNT_ID}" \
-e IBM_API_USERNAME="${IBM_API_USERNAME}" \
-e IBM_API_KEY="${IBM_API_KEY}" \
quay.io/cloud-governance/cloud-governance:latest