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

Add Tags dimension #227

Merged
merged 39 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9178aa0
Add Tags dimension
cnharris10 Oct 18, 2023
58a9950
Update tags.md
cnharris10 Oct 21, 2023
8faeb19
Update tags.md
cnharris10 Oct 23, 2023
0de1996
Merge branch 'working_draft' into 226-tags-dimension
cnharris10 Oct 26, 2023
1ab730b
Update specification/dimensions/tags.md
cnharris10 Oct 30, 2023
ed570ce
Update specification/dimensions/tags.md
cnharris10 Oct 30, 2023
8d8f034
Update specification/dimensions/tags.md
cnharris10 Oct 30, 2023
f331ad3
Update specification/dimensions/tags.md
cnharris10 Oct 30, 2023
1081864
Update tags.md
cnharris10 Oct 30, 2023
6ffafd8
Update tags.md
cnharris10 Oct 30, 2023
ab010c8
Update tags.md
cnharris10 Oct 30, 2023
baa26bb
Update tags.md
cnharris10 Oct 30, 2023
07168d6
Update tags.md
cnharris10 Oct 31, 2023
cdcf5bf
Format fixes
cnharris10 Oct 31, 2023
02b50ab
Replaced highlighting with bold text
cnharris10 Oct 31, 2023
765fd36
Ensure not breaks within the Tags table Column
cnharris10 Oct 31, 2023
47ef458
Update tags.md
cnharris10 Nov 1, 2023
a851a5f
Update tags.md
cnharris10 Nov 1, 2023
0395927
Update tags.md
cnharris10 Nov 3, 2023
e934741
Update tags.md
cnharris10 Nov 3, 2023
d256078
Update tags.md
cnharris10 Nov 3, 2023
03af758
Update specification/dimensions/tags.md
cnharris10 Nov 6, 2023
7d1e66e
Update tags.md
cnharris10 Nov 6, 2023
498239a
Update specification/dimensions/tags.md
cnharris10 Nov 6, 2023
d029e6e
Update specification/dimensions/tags.md
cnharris10 Nov 6, 2023
c22877f
Update tags.md
cnharris10 Nov 6, 2023
7ad1425
Update tags.md
cnharris10 Nov 6, 2023
1b2fea0
Update tags.md
cnharris10 Nov 6, 2023
5d62fe4
Merge branch 'working_draft' into 226-tags-dimension
cnharris10 Nov 6, 2023
d5fa82a
Update tags.md
cnharris10 Nov 7, 2023
4b023d5
Update tags.md
cnharris10 Nov 7, 2023
e719bb5
Update tags.md
cnharris10 Nov 7, 2023
e4bcfae
Update tags.md
cnharris10 Nov 7, 2023
0c84ff8
Update tags.md
cnharris10 Nov 7, 2023
24df32d
Update tags.md
cnharris10 Nov 7, 2023
dab9254
Update specification/dimensions/tags.md
cnharris10 Nov 7, 2023
3b44e6b
Update tags.md
cnharris10 Nov 7, 2023
ac21cf6
Update specification/dimensions/tags.md
cnharris10 Nov 7, 2023
f37f550
Update tags.md
cnharris10 Nov 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions specification/dimensions/dimensions.mdpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ dimensions to categorize, filter, and reveal details in your data when grouped w
!INCLUDE "servicename.md",1
!INCLUDE "subaccountid.md",1
!INCLUDE "subaccountname.md",1
!INCLUDE "tags.md",1

[FODOFC]: https://www.finops.org/framework/capabilities/
64 changes: 64 additions & 0 deletions specification/dimensions/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Tags

Tags are the set of finalized User-Defined and/or Provider-Defined Tags assigned to Tag Sources. Tags commonly add business context to billing data to identify and accurately allocate charges.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

If a Tag is subject to a set of prioritized rules for determining its value, it is finalized after a single value is chosen from a set of corresponding values. Otherwise, a Tag and a finalized Tag are equal.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

Tags adhere to the following requirements:

* Tags MUST only contain finalized tags.
* Tags MUST standardize to Key-Value Format.
* A Tag without a specified value MUST have its value set to null.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved
* Providers MUST NOT alter User-Defined Tag keys.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

Provider-defined Tags additionally adhere to the following requirements:

* Provider-defined Tags MUST be prefixed with a provider-defined prefix.
* Providers SHOULD publish all provider-defined prefixes within their respective documentation.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

## Provider-Defined vs. User-Defined Tags

The following is an example of one User-Defined Tag and one Provider-Defined Tag, respectively, with tag key, foo. The 1st property is not prefixed, and the Provider has a pre-selected prefix, `marketplace/`, applied to denote that it is a different type of tag.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

```json
{
"foo":"bar",
"marketplace/foo": "bar"
}
```

## Finalized Tags

The following example shows a simplified cost and usage data with one metered Account that contains one metered Virtual Machine. The Provider supports tag inheritance where an Account's User-Defined Tags are applied to all Resources' User-Defined Tags, where applicable.

| ResourceType | ResourceId | Column |
| :---------------| :----------| :----------------------------------|
| Account | my-account | { "team": "web", "env": "prod" } |
| Virtual Machine | my-vm | { "team": "web", *"env": "prod"* } |
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

After all tag inheritance rules are processed, the finalized cost and usage dataset shows that the Virtual Machine Resource did inherit tag, `env:prod`, from its corresponding Account because no tag with the same key exists. Conversely, the Virtual Machine Resource did not inherit tag, `team:web`, because the Provider's tag inheritance rules determine that aResource already containing a tag with the same key maintains that same tag.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

## Column ID

Tags

## Display Name

Tags

## Description

The set of finalized tags assigned to Tag Sources.
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

## Content Constraints

| Constraint | Value |
|:----------------|:-----------------|
| Column required | True |
| Data type | Object |
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved
| Allows nulls | True |
| Value format | MUST adhere to KeyValueFormat Attribute |
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

## Introduced (version)

1.0
44 changes: 44 additions & 0 deletions supporting_content/dimensions/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Column: Tags

## Example provider mappings

Current resource types found or extracted from available data sets:

| Provider | Dataset | Column | Hierarchical Resources | Supports Inheritance?
| :-------- | :---------------------- | :-------------------------------------------| :-------------------------------------------| :----------
| AWS | CUR | resourceTags/user:\*, costCategories/\* | Organization, Organizational Unit(s), Account | No
| GCP | BigQuery Billing Export | Tags | Resource Group, Subscription | Yes
| Microsoft | Cost details | tags, labels, system_labels, project.labels | Folder(s), Project | Yes
cnharris10 marked this conversation as resolved.
Show resolved Hide resolved

## Discussion Topics

Discussion / Scratch space:
- User-defined tags should not have a prefix
- Provider can create and account for a reserved prefix set
- Providers should publish known prefixes somewhere
- Refer to Numeric Attribute language around provider-publishing guidelines
- Separator poll?
- Double forward slash (Chris Harris)
- Pipe (Shawn Alpay)
- 2 columns: EffectiveTags and RawTags (better names to be decided)
- Tags
- Providers must account for collisions
- If inheritance exists for a set of tags, provide the “winning” tag
- If inheritance does not exist for a tag, provide all namespaced tags (i.e. costCategory/foo, resourceTags/user:foo)
- MUST adhere to the Key-Value attribute spec

- Questions:
- Inheritance (e.g., source)?
- Merging different datasets (e.g., source)?
- Do we split effective tags and raw tags or merge them together with a predefined key format (e.g., “<source>/<key>”)?
- Simple JSON key/value pair or array of JSON objects?
- What does it look like interpreting labels using Excel formulas only? Would users be required to dl a plugin, use vbscript, etc.
- Excel: https://support.microsoft.com/en-au/office/parse-text-as-json-or-xml-power-query-7436916b-210a-4299-83dd-8531a1d5e945 (supports {"foo": "bar"} approach)
- Sheets: Seems to require scripting
- How do we fit into the top 3 clouds?
- Should we give an opinion around requiring k/v tags?
- Create a poll around calling the dimension “Tags” or “Labels”?
- “Custom Tags/Labels”?
- One key/value pair for all tags “tags”: [ … ]
- Which raw format do we go with?