Skip to content

Commit 421b2b6

Browse files
authored
feat: Add support for Grafana version specification (#21)
1 parent 0e01ce6 commit 421b2b6

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
8080
| Name | Version |
8181
|------|---------|
8282
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
83-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.51 |
83+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66.1 |
8484

8585
## Providers
8686

8787
| Name | Version |
8888
|------|---------|
89-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.51 |
89+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66.1 |
9090

9191
## Modules
9292

@@ -128,6 +128,7 @@ No modules.
128128
| <a name="input_create_workspace"></a> [create\_workspace](#input\_create\_workspace) | Determines whether a workspace will be created or to use an existing workspace | `bool` | `true` | no |
129129
| <a name="input_data_sources"></a> [data\_sources](#input\_data\_sources) | The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY` | `list(string)` | `[]` | no |
130130
| <a name="input_description"></a> [description](#input\_description) | The workspace description | `string` | `null` | no |
131+
| <a name="input_grafana_version"></a> [grafana\_version](#input\_grafana\_version) | Specifies the version of Grafana to support in the new workspace. If not specified, the default version for the `aws_grafana_workspace` resource will be used. See `aws_grafana_workspace` documentation for available options. | `string` | `null` | no |
131132
| <a name="input_iam_role_arn"></a> [iam\_role\_arn](#input\_iam\_role\_arn) | Existing IAM role ARN for the workspace. Required if `create_iam_role` is set to `false` | `string` | `null` | no |
132133
| <a name="input_iam_role_description"></a> [iam\_role\_description](#input\_iam\_role\_description) | The description of the workspace IAM role | `string` | `null` | no |
133134
| <a name="input_iam_role_force_detach_policies"></a> [iam\_role\_force\_detach\_policies](#input\_iam\_role\_force\_detach\_policies) | Determines whether the workspace IAM role policies will be forced to detach | `bool` | `true` | no |

examples/complete/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ module "managed_grafana" {
3636
data_sources = ["CLOUDWATCH", "PROMETHEUS", "XRAY"]
3737
notification_destinations = ["SNS"]
3838
stack_set_name = local.name
39+
grafana_version = "9.4"
3940

4041
configuration = jsonencode({
4142
unifiedAlerting = {
4243
enabled = true
4344
}
4445
})
4546

47+
4648
# vpc configuration
4749
vpc_configuration = {
4850
subnet_ids = module.vpc.private_subnets

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ resource "aws_grafana_workspace" "this" {
1919
authentication_providers = var.authentication_providers
2020
permission_type = var.permission_type
2121

22+
grafana_version = var.grafana_version
2223
configuration = var.configuration
2324
data_sources = var.data_sources
2425
notification_destinations = var.notification_destinations

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ variable "permission_type" {
5656
default = "SERVICE_MANAGED"
5757
}
5858

59+
variable "grafana_version" {
60+
description = "Specifies the version of Grafana to support in the new workspace. If not specified, the default version for the `aws_grafana_workspace` resource will be used. See `aws_grafana_workspace` documentation for available options."
61+
type = string
62+
default = null
63+
}
64+
5965
variable "configuration" {
6066
description = "The configuration string for the workspace"
6167
type = string

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.51"
7+
version = ">= 4.66.1"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)