Skip to content

Conversation

@muylucir
Copy link
Contributor


Cost analysis is a very important area in SaaS.
SaaS Boost supports various cost allocation tags.
However, the cost allocation tag for the tier is not supported.
Accurate cost measurement for each tier is an essential element in cost estimation.

For example, if a lower tier spends more money than a higher tier, it will adversely affect profitability. We should be able to identify this.

Screen Shot 2022-08-16 at 11 49 24 AM

In the process of creating a tenant, a code was added to add the tier information to the tag and use it for cost estimation.

It's a simple fix, but I think it's necessary.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Copy link
Contributor

@PoeppingT PoeppingT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @muylucir , thanks for submitting this PR! I have a few changes to suggest:

  1. in tenant-onboarding-app.yaml you have not added the Tier tag to the CodePipeline and WindowsLaunchTemplate resources. If this was intentional, can you please explain why?
  2. the Tier Parameter needs to be passed to each of the sub-stacks: efs, fsx, and rds. This can be done by adding Tier: !Ref Tier to the Parameters those resources at the bottom of tenant-onboarding-app.yaml
  3. the tenant-onboarding-app.yaml CloudFormation stack is created by the SaaS Boost Onboarding Service. It's a good idea to add Tier as a parameter to that stack, but for that parameter to have any function it must be passed by the Onboarding Service. Look for the handleOnboardingBaseProvisioned function in services/onboarding-service/.../OnboardingService.java to find how those stack parameters are collected and how the stack is created in response to provisioning events.

Lastly I would recommend you test to validate your changes. This can be done by following the sample application instructions in the Getting Started Guide and validating that each resource you want to be tagged per tenant is tagged with the proper Tier.

Thanks for your contribution, and I look forward to seeing your changes soon!

@muylucir
Copy link
Contributor Author

Hi @PoeppingT
Thanks for the detailed explanation.

A1) No other reason. I think I left it out by mistake.
A2) I understand how to pass parameters to other resources in tenant-onboarding-app.yaml.
A3) I'll take a look at handleOnboardingBaseProvisioned again and understand.

I will request a review after making necessary changes and testing enough.

Thanks!! :)

… CloudFormation stack through handleOnboardingBaseProvisioned
@muylucir
Copy link
Contributor Author

Hi @PoeppingT

I modified the code. To pass the Tier tag as a parameter to the tenant-onboarding-app.yaml CloudFormation stack through handleOnboardingBaseProvisioned in services/onboarding-service/.../OnboardingService.java.

I used the sample application to complete the necessary tests. Tier tags are normally assigned to all resources (rds, efs, ecs, etc.) created by CloudFormation stack.

@muylucir muylucir requested a review from PoeppingT August 22, 2022 11:35
Copy link
Contributor

@PoeppingT PoeppingT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, and for the contribution!

@PoeppingT PoeppingT merged commit 3814af4 into awslabs:main Aug 22, 2022
@brtrvn brtrvn mentioned this pull request Sep 29, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants