Skip to content

Commit

Permalink
fix cod (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov-aws authored Jun 22, 2023
1 parent 2366395 commit 8702fd0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
16 changes: 9 additions & 7 deletions cfn-templates/cid-cfn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions changes/CHANGELOG-cod.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion cid/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__version__ = '0.2.17'
__version__ = '0.2.18'
5 changes: 3 additions & 2 deletions cid/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8702fd0

Please sign in to comment.