Resource: aws_cloudfrontkeyvaluestore_key

Terraform resource for managing an AWS CloudFront KeyValueStore Key.

Example Usage

Basic Usage

resource "aws_cloudfront_key_value_store" "example" {
  name    = "ExampleKeyValueStore"
  comment = "This is an example key value store"
}

resource "aws_cloudfrontkeyvaluestore_key" "example" {
  key_value_store_arn = aws_cloudfront_key_value_store.example.arn
  key                 = "Test Key"
  value               = "Test Value"
}

Argument Reference

The following arguments are required:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import CloudFront KeyValueStore Key using the example_id_arg. For example:

import {
  to = aws_cloudfrontkeyvaluestore_key.example
  id = "arn:aws:cloudfront::111111111111:key-value-store/8562g61f-caba-2845-9d99-b97diwae5d3c,someKey"
}

Using terraform import, import CloudFront KeyValueStore Key using the id. For example:

% terraform import aws_cloudfrontkeyvaluestore_key.example arn:aws:cloudfront::111111111111:key-value-store/8562g61f-caba-2845-9d99-b97diwae5d3c,someKey