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

AWS cost attribution (2a/4): deploy to nasa-cryo #4874

Closed
2 tasks done
Tracked by #4872
consideRatio opened this issue Sep 24, 2024 · 7 comments · Fixed by #4953
Closed
2 tasks done
Tracked by #4872

AWS cost attribution (2a/4): deploy to nasa-cryo #4874

consideRatio opened this issue Sep 24, 2024 · 7 comments · Fixed by #4953
Assignees

Comments

@consideRatio
Copy link
Contributor

consideRatio commented Sep 24, 2024

By following the docs from #4873, deploy the cost attribution system to the nasa-cryo cluster.

Definition of done

@consideRatio consideRatio changed the title AWS cost attribution (2/n): roll out to nasa-cryo AWS cost attribution (2/n): deploy to nasa-cryo Sep 25, 2024
@consideRatio consideRatio changed the title AWS cost attribution (2/n): deploy to nasa-cryo AWS cost attribution (2a/n): deploy to nasa-cryo Sep 25, 2024
@consideRatio consideRatio changed the title AWS cost attribution (2a/n): deploy to nasa-cryo AWS cost attribution (2a/4): deploy to nasa-cryo Sep 25, 2024
@sgibson91 sgibson91 self-assigned this Oct 3, 2024
@sgibson91
Copy link
Member

@sgibson91
Copy link
Member

Should I be creating hub-specific node groups for nasa-cryo?

@sgibson91
Copy link
Member

sgibson91 commented Oct 3, 2024

I ran into issues because the nasa-cryo account is a linked account to our AWS SSO sign-on, and cost allocation tags are only available at the payer account level.

Visit this URL to see: https://us-east-1.console.aws.amazon.com/billing/home?region=us-west-2#/tags

Terraform error:

│ Error: updating Cost Explorer Cost Allocation Tag (kubernetes.io/cluster/nasa-cryo): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: 9e32aa56-2236-44a7-9fef-282910a934ea, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.
│ 
│   with aws_ce_cost_allocation_tag.cost_allocation_tags["kubernetes.io/cluster/nasa-cryo"],
│   on cost-allocation.tf line 2, in resource "aws_ce_cost_allocation_tag" "cost_allocation_tags":
│    2: resource "aws_ce_cost_allocation_tag" "cost_allocation_tags" {
│ 
╵
╷
│ Error: updating Cost Explorer Cost Allocation Tag (kubernetes.io/created-for/pvc/namespace): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: 376d02cb-4606-4abe-9f22-ab55491d50b3, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.
│ 
│   with aws_ce_cost_allocation_tag.cost_allocation_tags["kubernetes.io/created-for/pvc/namespace"],
│   on cost-allocation.tf line 2, in resource "aws_ce_cost_allocation_tag" "cost_allocation_tags":
│    2: resource "aws_ce_cost_allocation_tag" "cost_allocation_tags" {
│ 
╵
╷
│ Error: updating Cost Explorer Cost Allocation Tag (2i2c.org/cluster-name): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: ad097fbc-767e-4c9f-8f5f-a536082cbb97, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.
│ 
│   with aws_ce_cost_allocation_tag.cost_allocation_tags["2i2c.org/cluster-name"],
│   on cost-allocation.tf line 2, in resource "aws_ce_cost_allocation_tag" "cost_allocation_tags":
│    2: resource "aws_ce_cost_allocation_tag" "cost_allocation_tags" {
│ 
╵
╷
│ Error: updating Cost Explorer Cost Allocation Tag (alpha.eksctl.io/cluster-name): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: b894e903-a5ea-48b1-98b5-7234f2c997e1, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.
│ 
│   with aws_ce_cost_allocation_tag.cost_allocation_tags["alpha.eksctl.io/cluster-name"],
│   on cost-allocation.tf line 2, in resource "aws_ce_cost_allocation_tag" "cost_allocation_tags":
│    2: resource "aws_ce_cost_allocation_tag" "cost_allocation_tags" {
│ 
╵
╷
│ Error: updating Cost Explorer Cost Allocation Tag (2i2c:hub-name): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: 31e55d03-c7bf-4c86-a1ed-4b650ccb19c8, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.
│ 
│   with aws_ce_cost_allocation_tag.cost_allocation_tags["2i2c:hub-name"],
│   on cost-allocation.tf line 2, in resource "aws_ce_cost_allocation_tag" "cost_allocation_tags":
│    2: resource "aws_ce_cost_allocation_tag" "cost_allocation_tags" {

We should maybe pick a different cluster to enable this on first, one that isn't a linked account? While we figure out this bug.

@sgibson91
Copy link
Member

This is now unblocked as we'll just deploy to another cluster, as decided on slack. Let's go for nasa-veda.

@sgibson91 sgibson91 changed the title AWS cost attribution (2a/4): deploy to nasa-cryo AWS cost attribution (2a/4): deploy to nasa-veda Oct 4, 2024
@sgibson91
Copy link
Member

VEDA has the same issue. On Monday, I'll try with earthscope.

@sgibson91 sgibson91 changed the title AWS cost attribution (2a/4): deploy to nasa-veda AWS cost attribution (2a/4): deploy to earthscope Oct 4, 2024
@sgibson91
Copy link
Member

I'm getting a warning about a deprecated argument which I'll ignore for now in favour of just getting another deployment rolled out.

│ Warning: Argument is deprecated
│ 
│   with aws_iam_role.aws_ce_grafana_backend_iam_role,
│   on aws-ce-grafana-backend-iam.tf line 2, in resource "aws_iam_role" "aws_ce_grafana_backend_iam_role":
│    2: resource "aws_iam_role" "aws_ce_grafana_backend_iam_role" {
│ 
│ The inline_policy argument is deprecated. Use the aws_iam_role_policy resource instead. If Terraform should exclusively manage all inline policy associations (the current behavior of
│ this argument), use the aws_iam_role_policies_exclusive resource as well.

@sgibson91
Copy link
Member

Nope, earthscope is linked too. I'm officially calling this blocked.

│ Error: updating Cost Explorer Cost Allocation Tag (alpha.eksctl.io/cluster-name): operation error Cost Explorer: UpdateCostAllocationTagsStatus, https response error StatusCode: 400, RequestID: bfd27b73-b16a-4040-9771-dec05e88b6d5, api error AccessDeniedException: Failed to update Cost Allocation Tag: Linked account doesn't have access to cost allocation tags.

@consideRatio consideRatio changed the title AWS cost attribution (2a/4): deploy to earthscope AWS cost attribution (2a/4): deploy to nasa-cryo Oct 7, 2024
@consideRatio consideRatio self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants