Resource: awsCloudfrontKeyGroup
Example Usage
The following example below creates a CloudFront key group.
/*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 awsCloudfrontPublicKeyExample =
new aws.cloudfrontPublicKey.CloudfrontPublicKey(this, "example", {
comment: "example public key",
encodedKey: '${file("public_key.pem")}',
name: "example-key",
});
const awsCloudfrontKeyGroupExample =
new aws.cloudfrontKeyGroup.CloudfrontKeyGroup(this, "example_1", {
comment: "example key group",
items: [awsCloudfrontPublicKeyExample.id],
name: "example-key-group",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsCloudfrontKeyGroupExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
comment
- (Optional) A comment to describe the key group..items
- (Required) A list of the identifiers of the public keys in the key group.name
- (Required) A name to identify the key group.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
etag
- The identifier for this version of the key group.id
- The identifier for the key group.
Import
CloudFront Key Group can be imported using the id
, e.g.,