collie-cli icon indicating copy to clipboard operation
collie-cli copied to clipboard

Writing tags to the cloud

Open Jelledb opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. As a platform operator I would like to write tags to the cloud from Collie so I can fix any incompliances, e.g. some tenants are missing a cost center tag.

Reach of the feature request Platform operators using tags or those that forgot to standardize some tags.

Impact of the feature request We currently offer the analyze-tags command which is helpful to identify gaps, but if I want to fix the issue, I still have to hop into the actual cloud platforms.

How would a solution look like?

collie tags set-missing --tags cost_center would go into a mode where it ask per tenant that misses that tag: What should the value be of cost_center? The user can type in the value and Collie will submit the result to the cloud platform.

(optional) Implementation Hints Any hints that could help implementation?

Make sure to write the result to the cache. Make sure to rename collie tenant analyze-tags to collie tags analyze-missing. Try to catch exceptions for incompliant tags ,e.g. GCP has a lot of requirements.

Jelledb avatar Sep 24 '21 12:09 Jelledb

Just to check the state of this, collie tag --help currently lists that command as a possibility

 Usage:   collie tag
  Version: 0.9.1     

  Description:

    Work with cloud tenants (AWS Accounts, Azure Subscriptions, GCP Projects) and list all of them, or see tags, costs, and more. Run "collie
    tenant -h" to see what is possible.                                                                                                      

  Options:

    -h, --help               - Show this help.                                                     
    -o, --output  [output]   - Defines the output format.                        (Default: "table")
    --debug       [boolean]  - Display debug logs                                (Default: false)  
    --verbose     [boolean]  - Display underlying individual cloud CLI commands  (Default: false)  

  Commands:

    analyze-missing            - Analyzes all available tags on tenants and returns the percentage of tenants  
                                 that make use of this tag.                                                    
    set-missing      <tagKey>  - Fix all tenants missing the given tag. Collie will ask you per tenant what the
                                 value should be and writes the change to the cloud platform(s).         

And btw. the description looks like a copy paste from collie tenant command, should probably be tenants -> tags

JohannesRudolph avatar Jan 19 '22 22:01 JohannesRudolph

Closed due to lack of community interest - feel free to revive discussion at https://github.com/meshcloud/collie-cli/discussions

JohannesRudolph avatar Jul 04 '23 18:07 JohannesRudolph