Skip to main content

AWS CDK Construct Library for Grafana

Project description

@robhan-cdk-lib/aws_grafana

AWS Cloud Development Kit (CDK) L2 constructs for Amazon Managed Grafana.

In aws-cdk-lib.aws_grafana, there currently only exist L1 constructs for Amazon Managed Grafana.

The CDK maintainers explain that publishing your own package is "by far the strongest signal you can give to the CDK team that a feature should be included within the core aws-cdk packages".

This project aims to develop aws_grafana L2 constructs to a maturity that is accepted to the CDK core.

Currently, development is focusing on the npm package. But PyPI, Maven Central, NuGet, and GitHub (for Go) will be added once a more stable state is reached.

Example use

import * as cdk from "aws-cdk-lib";
import { Construct } from "constructs";
import {
  AccountAccessType,
  AuthenticationProviders,
  PermissionTypes,
  Workspace,
} from "@robhan-cdk-lib/aws_grafana";
import { Role, ServicePrincipal } from "aws-cdk-lib/aws-iam";

export class AwsGrafanaCdkStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const grafanaRole = new Role(this, "GrafanaWorkspaceRole", {
      assumedBy: new ServicePrincipal("grafana.amazonaws.com"),
      description: "Role for Amazon Managed Grafana Workspace",
    });

    const workspace = new Workspace(this, "Workspace", {
      accountAccessType: AccountAccessType.CURRENT_ACCOUNT,
      authenticationProviders: [AuthenticationProviders.AWS_SSO],
      permissionType: PermissionTypes.SERVICE_MANAGED,
      role: grafanaRole,
    });
  }
}

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robhan_cdk_lib_aws_grafana-0.0.31.tar.gz (84.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robhan_cdk_lib_aws_grafana-0.0.31-py3-none-any.whl (82.4 kB view details)

Uploaded Python 3

File details

Details for the file robhan_cdk_lib_aws_grafana-0.0.31.tar.gz.

File metadata

File hashes

Hashes for robhan_cdk_lib_aws_grafana-0.0.31.tar.gz
Algorithm Hash digest
SHA256 1468394008108dbbc466984244675865bb45005d682c291d87cf398d61980416
MD5 f613a8f97286c7e0353c8cb19893864b
BLAKE2b-256 2f3cc0e4b6b58bbe66c36e78e31c57c1a7fd1e3a47bd31dd727a96acdfd25db6

See more details on using hashes here.

File details

Details for the file robhan_cdk_lib_aws_grafana-0.0.31-py3-none-any.whl.

File metadata

File hashes

Hashes for robhan_cdk_lib_aws_grafana-0.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 f43d19efe79e5c10a761ef38cfbccb1a1af34e26f3a92e3ecdfcefecdc053427
MD5 b2f1960c552a1d96e72e9803586d8215
BLAKE2b-256 93d08800c7b112ab59a72dec769f2857dea86df333e11cfa3a75f97ff4a30dbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page