Skip to content

Commit fd4be28

Browse files
philwittyRadek Simko
authored andcommitted
Added docs for kms
1 parent 5e18031 commit fd4be28

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: "aws"
3+
page_title: "AWS: aws_kms_alias"
4+
sidebar_current: "docs-aws-resource-kms-alias"
5+
description: |-
6+
Provides a display name for a customer master key.
7+
---
8+
9+
# aws\_kms\_alias
10+
11+
Provides an alias for a KMS customer master key. AWS Console enforces 1-to-1 mapping between aliases & keys,
12+
but API (hence Terraform too) allows you to create as many aliases as
13+
the [account limits](http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) allow you.
14+
15+
## Example Usage
16+
17+
```
18+
resource "aws_kms_key" "a" {
19+
}
20+
21+
resource "aws_kms_alias" "a" {
22+
name = "alias/my-key-alias"
23+
target_key_id = "${aws_kms_key.a.key_id}"
24+
}
25+
```
26+
27+
## Argument Reference
28+
29+
The following arguments are supported:
30+
31+
* `name` - (Required) The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
32+
* `target_key_id` - (Required) Identifier for the key for which the alias is for, can be either an ARN or key_id.
33+
34+
## Attributes Reference
35+
36+
The following attributes are exported:
37+
38+
* `arn` - The Amazon Resource Name (ARN) of the key alias.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: "aws"
3+
page_title: "AWS: aws_kms_key"
4+
sidebar_current: "docs-aws-resource-kms-key"
5+
description: |-
6+
Provides a KMS customer master key.
7+
---
8+
9+
# aws\_kms\_key
10+
11+
Provides a KMS customer master key.
12+
13+
## Example Usage
14+
15+
```
16+
resource "aws_kms_key" "a" {
17+
description = "KMS key 1"
18+
deletion_window = 10
19+
}
20+
```
21+
22+
## Argument Reference
23+
24+
The following arguments are supported:
25+
26+
* `description` - (Optional) The description of the key as viewed in AWS console.
27+
* `key_usage` - (Optional) Specifies the intended use of the key. Currently this defaults to ENCRYPT/DECRYPT, and only symmetric encryption and decryption are supported.
28+
* `policy` - (Optional) A valid policy JSON document.
29+
* `deletion_window` - (Optional) Duration in days after which the key is deleted after destruction of the resource, must be between 7 and 30 days.
30+
31+
## Attributes Reference
32+
33+
The following attributes are exported:
34+
35+
* `arn` - The Amazon Resource Name (ARN) of the key.
36+
* `key_id` - The globally unique identifier for the key.

website/source/layouts/aws.erb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,20 @@
405405
</ul>
406406
</li>
407407

408+
<li<%= sidebar_current(/^docs-aws-resource-kms/) %>>
409+
<a href="#">KMS Resources</a>
410+
<ul class="nav nav-visible">
411+
412+
<li<%= sidebar_current("docs-aws-resource-kms-key") %>>
413+
<a href="/docs/providers/aws/r/kms_key.html">aws_kms_key</a>
414+
</li>
415+
<li<%= sidebar_current("docs-aws-resource-kms-alias") %>>
416+
<a href="/docs/providers/aws/r/kms_alias.html">aws_kms_alias</a>
417+
</li>
418+
419+
</ul>
420+
</li>
421+
408422
<li<%= sidebar_current(/^docs-aws-resource-lambda/) %>>
409423
<a href="#">Lambda Resources</a>
410424
<ul class="nav nav-visible">

0 commit comments

Comments
 (0)