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

[Enhancement]: Service Account Resource for Managed Grafana #37808

Closed
lorrrrrrrenzo opened this issue Jun 3, 2024 · 9 comments
Closed

[Enhancement]: Service Account Resource for Managed Grafana #37808

lorrrrrrrenzo opened this issue Jun 3, 2024 · 9 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/grafana Issues and PRs that pertain to the grafana service.

Comments

@lorrrrrrrenzo
Copy link

Description

The recent release of Managed Grafana 10 introduces the ability to use Grafana Service Accounts and Service Account Tokens for improved authn/z. I am proposing that support for this new authentication method be added to the AWS provider, with an eye towards making sure it integrates well with the Grafana provider, which according to its documentation, already supports authentication with Service Account Tokens.

Affected Resource(s) and/or Data Source(s)

  • aws_grafana_workspace
  • aws_grafana_service_account (new)

Potential Terraform Configuration

resource "aws_grafana_workspace" "example" {
  account_access_type      = "CURRENT_ACCOUNT"
  authentication_providers = ["SAML"]
  permission_type          = "SERVICE_MANAGED"
  role_arn                 = aws_iam_role.assume.arn
}

resource "aws_grafana_service_account" "example_admin" {
  workspace_id = aws_grafana_workspace.example.id
  role = "ADMIN"
}

// service account tokens can be created programmatically as needed with 
// aws grafana create-workspace-service-account-token, as part of CI

References

https://registry.terraform.io/providers/grafana/grafana/latest/docs

https://aws.amazon.com/blogs/mt/amazon-managed-grafana-announces-support-for-grafana-version-10-4
(Look at the section "Service Accounts and new APIs" for an example of the new authentication flow)

https://grafana.com/docs/grafana/v10.4/administration/service-accounts/

Would you like to implement a fix?

None

@lorrrrrrrenzo lorrrrrrrenzo added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/grafana Issues and PRs that pertain to the grafana service. label Jun 3, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 3, 2024
@aristosvo
Copy link
Contributor

I'll try to pick this up. This requires a move to SDK v2, I'll pick that up first.

@lorrrrrrrenzo
Copy link
Author

@aristosvo I'm happy to hear that you're taking this on! Just out of technical curiosity, what introduces the requirement to move to SDK v2? I'm taking a look at the AWS SDK (assuming that is what you're referring to) and it seems like AMG service accounts are supported by it? For instance, I see that CreateWorkspaceServiceAccountInput is available, along with all of the expected functions.

Thanks again!

@aristosvo
Copy link
Contributor

Hi @lorrrrrrrenzo 👋

The reason is explained in this issue, new resources are not accepted when using the old SDK.

@lorrrrrrrenzo
Copy link
Author

Great to know, thanks @aristosvo!

@aristosvo
Copy link
Contributor

Hi @lorrrrrrrenzo!

I think this one can be closed, as #37645 is an extended duplicate of this one.

In the meantime the AWS SDK Go PR is ready for review, so things are in progress 👍🏽

@lorrrrrrrenzo
Copy link
Author

Closing this, as it's a duplicate of #37645.

@lorrrrrrrenzo lorrrrrrrenzo closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@terraform-aws-provider terraform-aws-provider bot removed the needs-triage Waiting for first response or review from a maintainer. label Jun 6, 2024
Copy link

github-actions bot commented Jul 7, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/grafana Issues and PRs that pertain to the grafana service.
Projects
None yet
Development

No branches or pull requests

2 participants