-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Frontend Observability provider
This commit adds the groundwork to support Frontend Observability as code. More specificailly, the change contains 1. A Go HTTP client that consumes the Apps API (Create/Read/Update/Delete) 2. Data Source and Resource version of the Frontend Observability App entity.
- Loading branch information
Showing
23 changed files
with
1,753 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "grafana_frontend_o11y_app Data Source - terraform-provider-grafana" | ||
subcategory: "Frontend Observability" | ||
description: |- | ||
--- | ||
|
||
# grafana_frontend_o11y_app (Data Source) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "grafana_frontend_o11y_app" "test-app" { | ||
stack_id = 1 | ||
name = "test-app" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the Frontend Observability App. Part of the Terraform Resource ID. | ||
- `stack_id` (Number) The Stack ID of the Grafana Cloud instance. Part of the Terraform Resource ID. | ||
|
||
### Read-Only | ||
|
||
- `allowed_origins` (List of String) A list of allowed origins for CORS. | ||
- `extra_log_attributes` (Map of String) The extra attributes to append in each signal. | ||
- `id` (Number) The Terraform Resource ID. This auto-generated from Frontend Observability API. | ||
- `settings` (Map of String) The settings of the Frontend Observability App. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "grafana_frontend_o11y_app Resource - terraform-provider-grafana" | ||
subcategory: "Connections" | ||
description: |- | ||
--- | ||
|
||
# grafana_frontend_o11y_app (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "grafana_frontend_o11y_app" "test-app" { | ||
stack_id = 1 | ||
name = "test-app" | ||
allowed_origins = ["https://grafana.com"] | ||
extra_log_attributes = { | ||
"terraform" : "true" | ||
} | ||
settings = { | ||
"geolocation.enabled" : "1" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `allowed_origins` (List of String) A list of allowed origins for CORS. | ||
- `extra_log_attributes` (Map of String) The extra attributes to append in each signal. | ||
- `name` (String) The name of Frontend Observability App. Part of the Terraform Resource ID. | ||
- `settings` (Map of String) The settings of the Frontend Observability app. | ||
- `stack_id` (Number) The Stack ID of the Grafana Cloud instance. Part of the Terraform Resource ID. | ||
|
||
### Read-Only | ||
|
||
- `id` (Number) The Terraform Resource ID. This is auto-generated from Frontend Observability API. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import grafana_frontend_o11y_app.name "{{ stack_id }}:{{ name }}" | ||
``` |
4 changes: 4 additions & 0 deletions
4
examples/data-sources/grafana_frontend_o11y_app/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "grafana_frontend_o11y_app" "test-app" { | ||
stack_id = 1 | ||
name = "test-app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import grafana_frontend_o11y_app.name "{{ stack_id }}:{{ name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import grafana_frontend_o11y_app.name "{{ stack_id }}:{{ name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
resource "grafana_frontend_o11y_app" "test-app" { | ||
stack_id = 1 | ||
name = "test-app" | ||
allowed_origins = ["https://grafana.com"] | ||
|
||
extra_log_attributes = { | ||
"terraform" : "true" | ||
} | ||
|
||
settings = { | ||
"geolocation.enabled" : "1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.