Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Azul resources #1552

Closed
jessebrennan opened this issue Feb 7, 2020 · 6 comments
Closed

Tag Azul resources #1552

jessebrennan opened this issue Feb 7, 2020 · 6 comments
Assignees
Labels
demoed [process] Successfully demonstrated to team enh [type] New feature or request infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team

Comments

@jessebrennan
Copy link
Contributor

jessebrennan commented Feb 7, 2020

Tag all cloud resources created by Azul. This helps with cost tracking, accountability, etc.

Tags to add and their expected value source:

@natanlao
Copy link
Contributor

natanlao commented Apr 6, 2020

@hannes-ucsc
Copy link
Member

#556 is really close. I'd strike out the third bullet.

@hannes-ucsc
Copy link
Member

#556 has landed.

@natanlao
Copy link
Contributor

natanlao commented Apr 8, 2020

Amar pointed me to this DCP RFC on resource tagging, which defines a slightly different superset of the tags in this issue. Should I use these tags for consistency?

@natanlao
Copy link
Contributor

natanlao commented Apr 8, 2020

I discussed this issue with @hannes-ucsc after standup today. After our conversation, I am taking this approach:

  • Implementing both the tags specified in the issue and the tags in DCP RFC 6. (AWS tags are case-sensitive, so we can have both Owner and owner).
  • The Name tag will follow the following guidelines:
    • Unique across all resources
    • Consistent with any name or ID attribute in the associated Terraform resource
    • If no name or ID attribute is present, the resource name will include the AWS service name
  • The service tag is set to Azul

@natanlao
Copy link
Contributor

After review of #1701, @jessebrennan, @hannes-ucsc, @amarjandu, and I spoke about tagging strategy in general. From our conversation, the approach has been revised:

  • Support for the RFC is being dropped.
  • A tag, component, with the service name and resource name (but not the stage name) is being added. (e.g., azul-{resource_name})
  • All tag names are now lowercase so that tags are compatible on both AWS and GCP.
  • On AWS, the Name tag has special meaning, so during terraform post-processing, tags associated with AWS resources will have the name key uppercased to Name. (Alternatively, maybe this step should add a Name key in addition to name.)
  • The creator tag will continue to use the UserId from aws sts get-caller-identity. While imperfect, it provides enough information to trace the user that deployed a resource, and there currently is no reliable alternative.
  • The scope of Tag Azul resources #1552 is being expanded to add tagging for GCP resources as well.
  • The value of the name tag will follow these guidelines:
    • If the resource already has a name assigned to it, use that value. This value should already be qualified.
    • If the resource does not already have a name assigned to it, create a unique value in the qualified format (e.g., azul-foo-dev)
    • Each name should be unique.
  • The AzulDeployment tag is being dropped.

This leaves us with a new set of tags:

  • project, set to dcp
  • service, set to azul
  • component, set to azul-{resource_name}
  • deployment, set to config.deployment_stage
  • owner, set to config.owner
  • creator, set to UserId as described above
  • name, set as described above

Please let me know if I'm missing anything here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demoed [process] Successfully demonstrated to team enh [type] New feature or request infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team
Projects
None yet
Development

No branches or pull requests

5 participants