You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manages an AWS EC2 (Elastic Compute Cloud) VPC Encryption Control.
6
+
Manages a VPC Encryption Control.
7
7
---
8
-
<!---
9
-
Documentation guidelines:
10
-
- Begin resource descriptions with "Manages..."
11
-
- Use simple language and avoid jargon
12
-
- Focus on brevity and clarity
13
-
- Use present tense and active voice
14
-
- Don't begin argument/attribute descriptions with "An", "The", "Defines", "Indicates", or "Specifies"
15
-
- Boolean arguments should begin with "Whether to"
16
-
- Use "example" instead of "test" in examples
17
-
--->
18
8
19
9
# Resource: aws_vpc_encryption_control
20
10
21
-
Manages an AWS EC2 (Elastic Compute Cloud) VPC Encryption Control.
11
+
Manages a VPC Encryption Control.
22
12
23
13
## Example Usage
24
14
25
15
### Basic Usage
26
16
27
17
```terraform
28
18
resource "aws_vpc_encryption_control" "example" {
19
+
vpc_id = aws_vpc.example.id
20
+
mode = "monitor"
21
+
}
22
+
23
+
resource "aws_vpc" "example" {
24
+
cidr_block = "10.1.0.0/16"
29
25
}
30
26
```
31
27
32
28
## Argument Reference
33
29
34
30
The following arguments are required:
35
31
36
-
*`example_arg` - (Required) Brief description of the required argument.
32
+
*`mode` - (Required) Mode to enable for VPC Encryption Control.
33
+
Valid values are `monitor` or `enforce`.
34
+
*`vpc_id` - (Required) The ID of the VPC the VPC Encryption Control is linked to.
37
35
38
36
The following arguments are optional:
39
37
40
-
*`optional_arg` - (Optional) Brief description of the optional argument.
38
+
*`egress_only_internet_gateway_exclusion` - (Optional) Whether to exclude Egress-Only Internet Gateways from encryption enforcement.
39
+
Valid values are `disable` or `enable`.
40
+
Default is `disable`.
41
+
Only valid when `mode` is `enforce`.
42
+
*`elastic_file_system_exclusion` - (Optional) Whether to exclude Elastic File System (EFS) from encryption enforcement.
43
+
Valid values are `disable` or `enable`.
44
+
Default is `disable`.
45
+
Only valid when `mode` is `enforce`.
46
+
*`internet_gateway_exclusion` - (Optional) Whether to exclude Internet Gateways from encryption enforcement.
47
+
Valid values are `disable` or `enable`.
48
+
Default is `disable`.
49
+
Only valid when `mode` is `enforce`.
50
+
*`lambda_exclusion` - (Optional) Whether to exclude Lambda Functions from encryption enforcement.
51
+
Valid values are `disable` or `enable`.
52
+
Default is `disable`.
53
+
Only valid when `mode` is `enforce`.
54
+
*`nat_gateway_exclusion` - (Optional) Whether to exclude NAT Gateways from encryption enforcement.
55
+
Valid values are `disable` or `enable`.
56
+
Default is `disable`.
57
+
Only valid when `mode` is `enforce`.
58
+
*`tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
59
+
*`virtual_private_gateway_exclusion` - (Optional) Whether to exclude Virtual Private Gateways from encryption enforcement.
60
+
Valid values are `disable` or `enable`.
61
+
Default is `disable`.
62
+
Only valid when `mode` is `enforce`.
63
+
*`vpc_lattice_exclusion` - (Optional) Whether to exclude VPC Lattice from encryption enforcement.
64
+
Valid values are `disable` or `enable`.
65
+
Default is `disable`.
66
+
Only valid when `mode` is `enforce`.
67
+
*`vpc_peering_exclusion` - (Optional) Whether to exclude peered VPCs from encryption enforcement.
68
+
Valid values are `disable` or `enable`.
69
+
Default is `disable`.
70
+
Only valid when `mode` is `enforce`.
41
71
42
72
## Attribute Reference
43
73
44
74
This resource exports the following attributes in addition to the arguments above:
45
75
46
-
*`arn` - ARN of the VPC Encryption Control.
47
-
*`example_attribute` - Brief description of the attribute.
76
+
*`id` - The ID of the VPC Encryption Control.
77
+
*`resource_exclusions` - State of exclusions from encryption enforcement.
78
+
Will be `nil` if `mode` is `monitor`.
79
+
See [`resource_exclusions`](#resource_exclusions) below
80
+
*`state` - The current state of the VPC Encryption Control.
81
+
*`state_message` - A message providing additional information about the state of the VPC Encryption Control.
82
+
*`tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block).
83
+
84
+
### `resource_exclusions`
85
+
86
+
*`egress_only_internet_gateway` - `state` and `state_message` describing encryption enforcement state for Egress-Only Internet Gateways.
87
+
*`elastic_file_system` - `state` and `state_message` describing encryption enforcement state for Elastic File System (EFS).
88
+
*`internet_gateway` - `state` and `state_message` describing encryption enforcement state for Internet Gateways.
89
+
*`lambda` - `state` and `state_message` describing encryption enforcement state for Lambda Functions.
90
+
*`nat_gateway` - `state` and `state_message` describing encryption enforcement state for NAT Gateways.
91
+
*`virtual_private_gateway` - `state` and `state_message` describing encryption enforcement state for Virtual Private Gateways.
92
+
*`vpc_lattice` - `state` and `state_message` describing encryption enforcement state for VPC Lattice.
93
+
*`vpc_peering` - `state` and `state_message` describing encryption enforcement state for peered VPCs.
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import EC2 (Elastic Compute Cloud) VPC Encryption Control using the `example_id_arg`. For example:
105
+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import VPC Encryption Control using the `id`. For example:
60
106
61
107
```terraform
62
108
import {
63
109
to = aws_vpc_encryption_control.example
64
-
id = "vpc_encryption_control-id-12345678"
110
+
id = "vpcec-12345678901234567"
65
111
}
66
112
```
67
113
68
-
Using `terraform import`, import EC2 (Elastic Compute Cloud) VPC Encryption Control using the `example_id_arg`. For example:
114
+
Using `terraform import`, import VPC Encryption Control using the `id`. For example:
0 commit comments