Skip to content

Commit 8702fd0

Browse files
authored
fix cod (#558)
1 parent 2366395 commit 8702fd0

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

cfn-templates/cid-cfn.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Parameters:
137137
CidVersion:
138138
Type: String
139139
MinLength: 5
140-
Default: 0.2.17
140+
Default: 0.2.18
141141
Description: A version of CID package
142142
Suffix:
143143
Type: String
@@ -191,13 +191,15 @@ Parameters:
191191
AllowedValues: ["yes", "no"]
192192
PrimaryTagName:
193193
Type: String
194-
Description: Choose a tag name for Primary Tag. Currently used only in Compute Optimizer dashboard.
195-
Default: ""
194+
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.
195+
Default: "owner"
196+
MinLength: 1 # cid cmd do not accept empty parameters
196197
AllowedPattern: "[a-zA-Z0-9_]*"
197198
SecondaryTagName:
198199
Type: String
199-
Description: Choose a tag name for Secondary Tag. Currently used only in Compute Optimizer dashboard.
200-
Default: ""
200+
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.
201+
Default: "environment"
202+
MinLength: 1 # cid cmd do not accept empty parameters
201203
AllowedPattern: "[a-zA-Z0-9_]*"
202204

203205
Conditions:
@@ -1401,8 +1403,8 @@ Resources:
14011403
view-compute-optimizer-ebs-volume-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_ebs_volume'
14021404
view-compute-optimizer-auto-scale-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_auto_scale'
14031405
view-compute-optimizer-ec2-instance-lines-s3FolderPath: !Sub '${OptimizationDataCollectionBucketPath}/compute_optimizer/compute_optimizer_ec2_instance'
1404-
primary_tag_name: !Sub '${PrimaryTagName}'
1405-
secondary_tag_name: !Sub '${SecondaryTagName}'
1406+
dataset-compute-optimizer-all-options-primary-tag-name: !Sub '${PrimaryTagName}'
1407+
dataset-compute-optimizer-all-options-secondary-tag-name: !Sub '${SecondaryTagName}'
14061408

14071409
Outputs:
14081410
CostIntelligenceDashboardURL:

changes/CHANGELOG-cod.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# What's new in the Compute Optimizer Dashboard (COD)
22

3+
4+
## Compute Optimizer Dashboard - v2.0.0
5+
* 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.
6+
* Added finding history, showing all availabe findings for a particualr resource over time.
7+
* Added AccountId and BU filters.
8+
9+
**Important:** Update to this version requires cid-cmd v0.2.18.
10+
11+
```
12+
pip3 install --upgrade cid-cmd
13+
cid-cmd update --dashboards-id compute-optimizer-dashboard --force --recursive --on-drift override
14+
```
15+
316
## Compute Optimizer Dashboard - v1.0
417
* Initial release

cid/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
__version__ = '0.2.17'
2+
__version__ = '0.2.18'

cid/common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,11 +1321,12 @@ def create_or_update_dataset(self, dataset_definition: dict, dataset_id: str=Non
13211321
'cur_table_name': self.cur.tableName if cur_required else None
13221322
}
13231323

1324-
logger.debug(columns_tpl)
1324+
logger.debug(f'dataset_id={dataset_id}')
1325+
logger.debug(f'columns_tpl={columns_tpl}')
13251326

13261327
columns_tpl = self.get_template_parameters(
13271328
dataset_definition.get('parameters', dict()),
1328-
f'dataset-{dataset_id}-',
1329+
f"dataset-{dataset_id or data.get('DataSetId')}-",
13291330
columns_tpl,
13301331
)
13311332
logger.debug(columns_tpl)

0 commit comments

Comments
 (0)