-
Notifications
You must be signed in to change notification settings - Fork 60
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
add grafana terraform definition and comment for accessing key #287
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add e2b-grafana-cloud-access-policy-token
in packages/init/main.tf
Also could you add e2b-grafana-username
and fill with e2b-grafana-api-key
if you run this terraform.
If you could copy the behavior in init
, fill the new secret with " "
, otherwise terraform fails while trying to read it
Could you also add Makefile
, something like in #275
grafana/main.tf
Outdated
resource "grafana_cloud_stack" "my_stack" { | ||
provider = grafana.cloud | ||
|
||
name = "e2b-stack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use var.prefix
as we do in all other places 🙏🏻
grafana/main.tf
Outdated
service_account_id = grafana_cloud_stack_service_account.cloud_sa.id | ||
} | ||
|
||
# grafana_cloud_stack_service_account_token.cloud_sa.key // <-- how to get the key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This goes to the GCP secret
grafana/main.tf
Outdated
} | ||
|
||
// Step 2: Create a service account and key for the stack | ||
resource "grafana_cloud_stack_service_account" "cloud_sa" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really needed, it seems to me you only need to create Access Policy token
terraform resource
Co-authored-by: Jakub Novák <[email protected]>
main.tf
Outdated
@@ -245,3 +245,12 @@ module "nomad" { | |||
# Redis | |||
redis_port = var.redis_port | |||
} | |||
|
|||
|
|||
module "grafana" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it just as a separate module, it's only optional module and it can become very annoying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, then maybe in the makefile have it be like make plan-grafana
and make apply-grafana
?
terraform/grafana/main.tf
Outdated
# i think there is a incompatibility with wanting grafana to be in a different module | ||
# and having the init module contain the secrets definitions. could move the | ||
# secrets definitions here here though | ||
module "init" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakubno does this comment track or am I missing something
e051ac6
to
29909f9
Compare
29909f9
to
31ccc86
Compare
when testing, I'm running
|
No description provided.