Skip to content

Resource: awsGrafanaWorkspaceApiKey

Provides an Amazon Managed Grafana workspace API Key resource.

Example Usage

Basic configuration

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.grafanaWorkspaceApiKey.GrafanaWorkspaceApiKey(this, "key", {
  keyName: "test-key",
  keyRole: "VIEWER",
  secondsToLive: 3600,
  workspaceId: "${aws_grafana_workspace.test.id}",
});

Argument Reference

The following arguments are required:

  • keyName - (Required) Specifies the name of the API key. Key names must be unique to the workspace.
  • keyRole - (Required) Specifies the permission level of the API key. Valid values are viewer, editor, or admin.
  • secondsToLive - (Required) Specifies the time in seconds until the API key expires. Keys can be valid for up to 30 days.
  • workspaceId - (Required) The ID of the workspace that the API key is valid for.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • key - The key token in JSON format. Use this value as a bearer token to authenticate HTTP requests to the workspace.