Resource: awsGrafanaLicenseAssociation
Provides an Amazon Managed Grafana workspace license association 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";
const awsIamRoleAssume = new aws.iamRole.IamRole(this, "assume", {
assumeRolePolicy:
'${jsonencode({\n Version = "2012-10-17"\n Statement = [\n {\n Action = "sts:AssumeRole"\n Effect = "Allow"\n Sid = ""\n Principal = {\n Service = "grafana.amazonaws.com"\n }\n },\n ]\n })}',
name: "grafana-assume",
});
const awsGrafanaWorkspaceExample = new aws.grafanaWorkspace.GrafanaWorkspace(
this,
"example",
{
accountAccessType: "CURRENT_ACCOUNT",
authenticationProviders: ["SAML"],
permissionType: "SERVICE_MANAGED",
roleArn: awsIamRoleAssume.arn,
}
);
const awsGrafanaLicenseAssociationExample =
new aws.grafanaLicenseAssociation.GrafanaLicenseAssociation(
this,
"example_2",
{
licenseType: "ENTERPRISE_FREE_TRIAL",
workspaceId: awsGrafanaWorkspaceExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsGrafanaLicenseAssociationExample.overrideLogicalId("example");
Argument Reference
The following arguments are required:
licenseType
- (Required) The type of license for the workspace license association. Valid values areenterprise
andENTERPRISE_FREE_TRIAL
.workspaceId
- (Required) The workspace id.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
freeTrialExpiration
- IflicenseType
is set toENTERPRISE_FREE_TRIAL
, this is the expiration date of the free trial.licenseExpiration
- IflicenseType
is set toenterprise
, this is the expiration date of the enterprise license.
Import
Grafana workspace license association can be imported using the workspace's id
, e.g.,