published on Wednesday, Mar 4, 2026 by Pulumi
published on Wednesday, Mar 4, 2026 by Pulumi
Resource for maintaining exclusive management of resource key value pairs defined in an AWS CloudFront KeyValueStore.
!> This resource takes exclusive ownership over key value pairs defined in a KeyValueStore. This includes removal of key value pairs which are not explicitly configured. To prevent persistent drift, ensure any aws.cloudfront.KeyvaluestoreKey resources managed alongside this resource have an equivalent resource_key_value_pair argument.
Destruction of this resource means Terraform will no longer manage reconciliation of the configured key value pairs. It will not delete the configured key value pairs from the KeyValueStore.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.KeyValueStore("example", {
name: "ExampleKeyValueStore",
comment: "This is an example key value store",
});
const exampleKeyvaluestoreKeysExclusive = new aws.cloudfront.KeyvaluestoreKeysExclusive("example", {
keyValueStoreArn: example.arn,
resourceKeyValuePairs: [{
key: "Test Key",
value: "Test Value",
}],
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.KeyValueStore("example",
name="ExampleKeyValueStore",
comment="This is an example key value store")
example_keyvaluestore_keys_exclusive = aws.cloudfront.KeyvaluestoreKeysExclusive("example",
key_value_store_arn=example.arn,
resource_key_value_pairs=[{
"key": "Test Key",
"value": "Test Value",
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cloudfront.NewKeyValueStore(ctx, "example", &cloudfront.KeyValueStoreArgs{
Name: pulumi.String("ExampleKeyValueStore"),
Comment: pulumi.String("This is an example key value store"),
})
if err != nil {
return err
}
_, err = cloudfront.NewKeyvaluestoreKeysExclusive(ctx, "example", &cloudfront.KeyvaluestoreKeysExclusiveArgs{
KeyValueStoreArn: example.Arn,
ResourceKeyValuePairs: cloudfront.KeyvaluestoreKeysExclusiveResourceKeyValuePairArray{
&cloudfront.KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs{
Key: pulumi.String("Test Key"),
Value: pulumi.String("Test Value"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.KeyValueStore("example", new()
{
Name = "ExampleKeyValueStore",
Comment = "This is an example key value store",
});
var exampleKeyvaluestoreKeysExclusive = new Aws.CloudFront.KeyvaluestoreKeysExclusive("example", new()
{
KeyValueStoreArn = example.Arn,
ResourceKeyValuePairs = new[]
{
new Aws.CloudFront.Inputs.KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs
{
Key = "Test Key",
Value = "Test Value",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.KeyValueStore;
import com.pulumi.aws.cloudfront.KeyValueStoreArgs;
import com.pulumi.aws.cloudfront.KeyvaluestoreKeysExclusive;
import com.pulumi.aws.cloudfront.KeyvaluestoreKeysExclusiveArgs;
import com.pulumi.aws.cloudfront.inputs.KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new KeyValueStore("example", KeyValueStoreArgs.builder()
.name("ExampleKeyValueStore")
.comment("This is an example key value store")
.build());
var exampleKeyvaluestoreKeysExclusive = new KeyvaluestoreKeysExclusive("exampleKeyvaluestoreKeysExclusive", KeyvaluestoreKeysExclusiveArgs.builder()
.keyValueStoreArn(example.arn())
.resourceKeyValuePairs(KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs.builder()
.key("Test Key")
.value("Test Value")
.build())
.build());
}
}
resources:
example:
type: aws:cloudfront:KeyValueStore
properties:
name: ExampleKeyValueStore
comment: This is an example key value store
exampleKeyvaluestoreKeysExclusive:
type: aws:cloudfront:KeyvaluestoreKeysExclusive
name: example
properties:
keyValueStoreArn: ${example.arn}
resourceKeyValuePairs:
- key: Test Key
value: Test Value
Disallow Key Value Pairs
To automatically remove any configured key value pairs, omit a resource_key_value_pair block.
This will not prevent key value pairs from being defined in a KeyValueStore via Terraform (or any other interface). This resource enables bringing key value pairs into a configured state, however, this reconciliation happens only when
applyis proactively run.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.KeyvaluestoreKeysExclusive("example", {keyValueStoreArn: exampleAwsCloudfrontKeyValueStore.arn});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.KeyvaluestoreKeysExclusive("example", key_value_store_arn=example_aws_cloudfront_key_value_store["arn"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewKeyvaluestoreKeysExclusive(ctx, "example", &cloudfront.KeyvaluestoreKeysExclusiveArgs{
KeyValueStoreArn: pulumi.Any(exampleAwsCloudfrontKeyValueStore.Arn),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.KeyvaluestoreKeysExclusive("example", new()
{
KeyValueStoreArn = exampleAwsCloudfrontKeyValueStore.Arn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.KeyvaluestoreKeysExclusive;
import com.pulumi.aws.cloudfront.KeyvaluestoreKeysExclusiveArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new KeyvaluestoreKeysExclusive("example", KeyvaluestoreKeysExclusiveArgs.builder()
.keyValueStoreArn(exampleAwsCloudfrontKeyValueStore.arn())
.build());
}
}
resources:
example:
type: aws:cloudfront:KeyvaluestoreKeysExclusive
properties:
keyValueStoreArn: ${exampleAwsCloudfrontKeyValueStore.arn}
Create KeyvaluestoreKeysExclusive Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyvaluestoreKeysExclusive(name: string, args: KeyvaluestoreKeysExclusiveArgs, opts?: CustomResourceOptions);@overload
def KeyvaluestoreKeysExclusive(resource_name: str,
args: KeyvaluestoreKeysExclusiveArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KeyvaluestoreKeysExclusive(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_value_store_arn: Optional[str] = None,
max_batch_size: Optional[int] = None,
resource_key_value_pairs: Optional[Sequence[KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs]] = None)func NewKeyvaluestoreKeysExclusive(ctx *Context, name string, args KeyvaluestoreKeysExclusiveArgs, opts ...ResourceOption) (*KeyvaluestoreKeysExclusive, error)public KeyvaluestoreKeysExclusive(string name, KeyvaluestoreKeysExclusiveArgs args, CustomResourceOptions? opts = null)
public KeyvaluestoreKeysExclusive(String name, KeyvaluestoreKeysExclusiveArgs args)
public KeyvaluestoreKeysExclusive(String name, KeyvaluestoreKeysExclusiveArgs args, CustomResourceOptions options)
type: aws:cloudfront:KeyvaluestoreKeysExclusive
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KeyvaluestoreKeysExclusiveArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KeyvaluestoreKeysExclusiveArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KeyvaluestoreKeysExclusiveArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyvaluestoreKeysExclusiveArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyvaluestoreKeysExclusiveArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var keyvaluestoreKeysExclusiveResource = new Aws.CloudFront.KeyvaluestoreKeysExclusive("keyvaluestoreKeysExclusiveResource", new()
{
KeyValueStoreArn = "string",
MaxBatchSize = 0,
ResourceKeyValuePairs = new[]
{
new Aws.CloudFront.Inputs.KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := cloudfront.NewKeyvaluestoreKeysExclusive(ctx, "keyvaluestoreKeysExclusiveResource", &cloudfront.KeyvaluestoreKeysExclusiveArgs{
KeyValueStoreArn: pulumi.String("string"),
MaxBatchSize: pulumi.Int(0),
ResourceKeyValuePairs: cloudfront.KeyvaluestoreKeysExclusiveResourceKeyValuePairArray{
&cloudfront.KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var keyvaluestoreKeysExclusiveResource = new KeyvaluestoreKeysExclusive("keyvaluestoreKeysExclusiveResource", KeyvaluestoreKeysExclusiveArgs.builder()
.keyValueStoreArn("string")
.maxBatchSize(0)
.resourceKeyValuePairs(KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs.builder()
.key("string")
.value("string")
.build())
.build());
keyvaluestore_keys_exclusive_resource = aws.cloudfront.KeyvaluestoreKeysExclusive("keyvaluestoreKeysExclusiveResource",
key_value_store_arn="string",
max_batch_size=0,
resource_key_value_pairs=[{
"key": "string",
"value": "string",
}])
const keyvaluestoreKeysExclusiveResource = new aws.cloudfront.KeyvaluestoreKeysExclusive("keyvaluestoreKeysExclusiveResource", {
keyValueStoreArn: "string",
maxBatchSize: 0,
resourceKeyValuePairs: [{
key: "string",
value: "string",
}],
});
type: aws:cloudfront:KeyvaluestoreKeysExclusive
properties:
keyValueStoreArn: string
maxBatchSize: 0
resourceKeyValuePairs:
- key: string
value: string
KeyvaluestoreKeysExclusive Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KeyvaluestoreKeysExclusive resource accepts the following input properties:
- Key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- Max
Batch intSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - Resource
Key List<KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair> - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
- Key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- Max
Batch intSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - Resource
Key []KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair Args - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
- key
Value StringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch IntegerSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key List<KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair> - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
- key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch numberSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair[] - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
- key_
value_ strstore_ arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max_
batch_ intsize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource_
key_ Sequence[Keyvaluestorevalue_ pairs Keys Exclusive Resource Key Value Pair Args] - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
- key
Value StringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch NumberSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key List<Property Map>Value Pairs - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyvaluestoreKeysExclusive resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Size IntegerIn Bytes - Total size of the Key Value Store in bytes.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Size numberIn Bytes - Total size of the Key Value Store in bytes.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
size_ intin_ bytes - Total size of the Key Value Store in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Size NumberIn Bytes - Total size of the Key Value Store in bytes.
Look up Existing KeyvaluestoreKeysExclusive Resource
Get an existing KeyvaluestoreKeysExclusive resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KeyvaluestoreKeysExclusiveState, opts?: CustomResourceOptions): KeyvaluestoreKeysExclusive@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key_value_store_arn: Optional[str] = None,
max_batch_size: Optional[int] = None,
resource_key_value_pairs: Optional[Sequence[KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs]] = None,
total_size_in_bytes: Optional[int] = None) -> KeyvaluestoreKeysExclusivefunc GetKeyvaluestoreKeysExclusive(ctx *Context, name string, id IDInput, state *KeyvaluestoreKeysExclusiveState, opts ...ResourceOption) (*KeyvaluestoreKeysExclusive, error)public static KeyvaluestoreKeysExclusive Get(string name, Input<string> id, KeyvaluestoreKeysExclusiveState? state, CustomResourceOptions? opts = null)public static KeyvaluestoreKeysExclusive get(String name, Output<String> id, KeyvaluestoreKeysExclusiveState state, CustomResourceOptions options)resources: _: type: aws:cloudfront:KeyvaluestoreKeysExclusive get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- Max
Batch intSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - Resource
Key List<KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair> - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- Key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- Max
Batch intSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - Resource
Key []KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair Args - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- key
Value StringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch IntegerSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key List<KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair> - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - total
Size IntegerIn Bytes - Total size of the Key Value Store in bytes.
- key
Value stringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch numberSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key KeyvaluestoreValue Pairs Keys Exclusive Resource Key Value Pair[] - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - total
Size numberIn Bytes - Total size of the Key Value Store in bytes.
- key_
value_ strstore_ arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max_
batch_ intsize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource_
key_ Sequence[Keyvaluestorevalue_ pairs Keys Exclusive Resource Key Value Pair Args] - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - total_
size_ intin_ bytes - Total size of the Key Value Store in bytes.
- key
Value StringStore Arn Amazon Resource Name (ARN) of the Key Value Store.
The following arguments are optional:
- max
Batch NumberSize - Maximum resource key values pairs that will update in a single API request. AWS has a default quota of 50 keys or a 3 MB payload, whichever is reached first. Defaults to
50. - resource
Key List<Property Map>Value Pairs - A list of all resource key value pairs associated with the KeyValueStore.
See
resource_key_value_pairbelow. - total
Size NumberIn Bytes - Total size of the Key Value Store in bytes.
Supporting Types
KeyvaluestoreKeysExclusiveResourceKeyValuePair, KeyvaluestoreKeysExclusiveResourceKeyValuePairArgs
Import
Using pulumi import, import AWS CloudFront KeyValueStore Key Value Pairs using the key_value_store_arn. For example:
$ pulumi import aws:cloudfront/keyvaluestoreKeysExclusive:KeyvaluestoreKeysExclusive example arn:aws:cloudfront::111111111111:key-value-store/8562g61f-caba-2845-9d99-b97diwae5d3c
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Wednesday, Mar 4, 2026 by Pulumi
