Class DefaultKmsKey
Provides a resource to manage the default customer master key (CMK) that your AWS account uses to encrypt EBS volumes.
Your AWS account has an AWS-managed default CMK that is used for encrypting an EBS volume when no CMK is specified in the API call that creates the volume.
By using the aws.ebs.DefaultKmsKey resource, you can specify a customer-managed CMK to use in place of the AWS-managed default CMK.
NOTE: Creating an
aws.ebs.DefaultKmsKeyresource does not enable default EBS encryption. Use theaws.ebs.EncryptionByDefaultto enable default EBS encryption.
NOTE: Destroying this resource will reset the default CMK to the account's AWS-managed default CMK for EBS.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ebs.DefaultKmsKey("example", new Aws.Ebs.DefaultKmsKeyArgs
{
KeyArn = aws_kms_key.Example.Arn,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ebs
Assembly: Pulumi.Aws.dll
Syntax
public class DefaultKmsKey : CustomResource
Constructors
View SourceDefaultKmsKey(String, DefaultKmsKeyArgs, CustomResourceOptions)
Create a DefaultKmsKey resource with the given unique name, arguments, and options.
Declaration
public DefaultKmsKey(string name, DefaultKmsKeyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DefaultKmsKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceKeyArn
The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use to encrypt the EBS volume.
Declaration
public Output<string> KeyArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DefaultKmsKeyState, CustomResourceOptions)
Get an existing DefaultKmsKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DefaultKmsKey Get(string name, Input<string> id, DefaultKmsKeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DefaultKmsKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DefaultKmsKey |