From 8702fd001a2480d36992922957e69cf333cab2fb Mon Sep 17 00:00:00 2001 From: Iakov GAN <82834333+iakov-aws@users.noreply.github.com> Date: Fri, 23 Jun 2023 01:17:22 +0200 Subject: [PATCH] fix cod (#558) --- cfn-templates/cid-cfn.yml | 16 +++++++++------- changes/CHANGELOG-cod.md | 13 +++++++++++++ cid/_version.py | 2 +- cid/common.py | 5 +++-- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/cfn-templates/cid-cfn.yml b/cfn-templates/cid-cfn.yml index dbb1f730..cdb2007b 100644 --- a/cfn-templates/cid-cfn.yml +++ b/cfn-templates/cid-cfn.yml @@ -137,7 +137,7 @@ Parameters: CidVersion: Type: String MinLength: 5 - Default: 0.2.17 + Default: 0.2.18 Description: A version of CID package Suffix: Type: String @@ -191,13 +191,15 @@ Parameters: AllowedValues: ["yes", "no"] PrimaryTagName: Type: String - Description: Choose a tag name for Primary Tag. Currently used only in Compute Optimizer dashboard. - Default: "" + Description: Choose a tag name for Primary Tag. Can be any Tag name (owner, environment, finops_exception). Currently used only in Compute Optimizer dashboard. Leve as is if not sure. + Default: "owner" + MinLength: 1 # cid cmd do not accept empty parameters AllowedPattern: "[a-zA-Z0-9_]*" SecondaryTagName: Type: String - Description: Choose a tag name for Secondary Tag. Currently used only in Compute Optimizer dashboard. - Default: "" + Description: Choose a tag name for Secondary Tag. Can be any Tag name (owner, environment, finops_exception). Currently used only in Compute Optimizer dashboard. Leve as is if not sure. + Default: "environment" + MinLength: 1 # cid cmd do not accept empty parameters AllowedPattern: "[a-zA-Z0-9_]*" Conditions: @@ -1401,8 +1403,8 @@ Resources: view-compute-optimizer-ebs-volume-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_ebs_volume' view-compute-optimizer-auto-scale-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_auto_scale' view-compute-optimizer-ec2-instance-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_ec2_instance' - primary_tag_name: !Sub '${PrimaryTagName}' - secondary_tag_name: !Sub '${SecondaryTagName}' + dataset-compute-optimizer-all-options-primary-tag-name: !Sub '${PrimaryTagName}' + dataset-compute-optimizer-all-options-secondary-tag-name: !Sub '${SecondaryTagName}' Outputs: CostIntelligenceDashboardURL: diff --git a/changes/CHANGELOG-cod.md b/changes/CHANGELOG-cod.md index 8657c7af..e11b5251 100644 --- a/changes/CHANGELOG-cod.md +++ b/changes/CHANGELOG-cod.md @@ -1,4 +1,17 @@ # What's new in the Compute Optimizer Dashboard (COD) + +## Compute Optimizer Dashboard - v2.0.0 +* Added support of Tags. Currently dashboard use 2 tags (primary and secondary). You can specify on install or update. Values of these tags can be used in filters. +* Added finding history, showing all availabe findings for a particualr resource over time. +* Added AccountId and BU filters. + +**Important:** Update to this version requires cid-cmd v0.2.18. + +``` +pip3 install --upgrade cid-cmd +cid-cmd update --dashboards-id compute-optimizer-dashboard --force --recursive --on-drift override +``` + ## Compute Optimizer Dashboard - v1.0 * Initial release \ No newline at end of file diff --git a/cid/_version.py b/cid/_version.py index a76af3df..be31c393 100644 --- a/cid/_version.py +++ b/cid/_version.py @@ -1,2 +1,2 @@ -__version__ = '0.2.17' +__version__ = '0.2.18' diff --git a/cid/common.py b/cid/common.py index 66358822..5f090ca1 100644 --- a/cid/common.py +++ b/cid/common.py @@ -1321,11 +1321,12 @@ def create_or_update_dataset(self, dataset_definition: dict, dataset_id: str=Non 'cur_table_name': self.cur.tableName if cur_required else None } - logger.debug(columns_tpl) + logger.debug(f'dataset_id={dataset_id}') + logger.debug(f'columns_tpl={columns_tpl}') columns_tpl = self.get_template_parameters( dataset_definition.get('parameters', dict()), - f'dataset-{dataset_id}-', + f"dataset-{dataset_id or data.get('DataSetId')}-", columns_tpl, ) logger.debug(columns_tpl)