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
This Terraform module provisions the necessary AWS infrastructure for a Redpanda customer-managed VPC cluster. It configures IAM roles, security groups, VPC components, and storage resources required for deploying Redpanda in a customer's AWS environment.
5
+
This Terraform module provisions the necessary AWS infrastructure for a Redpanda BYOVPC cluster. It configures IAM
6
+
roles, security groups, VPC components, and storage resources required for deploying Redpanda in a customer's AWS
7
+
environment.
6
8
7
9
## Module Overview
8
10
@@ -13,180 +15,50 @@ This module deploys several core components:
13
15
3.**Security Groups**: Sets up security groups with appropriate ingress/egress rules
14
16
4.**Storage Resources**: Creates S3 buckets for cloud storage and management, and DynamoDB table for state locking
15
17
16
-
## Usage
17
-
18
-
```terraform
19
-
module "redpanda_byoc" {
20
-
source = "redpanda-data/redpanda-byovpc/aws"
21
-
22
-
region = "us-east-1"
23
-
aws_account_id = "123456789012" # Optional if already authenticated
24
-
common_prefix = "redpanda"
25
-
26
-
# VPC Configuration
27
-
vpc_id = "" # Leave empty to create a new VPC
28
-
vpc_cidr_block = "10.0.0.0/16"
29
-
30
-
# Subnet Configuration
31
-
private_subnet_cidrs = [
32
-
"10.0.0.0/24",
33
-
"10.0.2.0/24",
34
-
"10.0.4.0/24"
35
-
]
36
-
public_subnet_cidrs = []
37
-
zones = ["use1-az1", "use1-az2", "use1-az3"]
38
-
39
-
# Tags and Conditions
40
-
condition_tags = {
41
-
"redpanda-managed" = "true"
42
-
}
43
-
default_tags = {
44
-
"Environment" = "production"
45
-
}
46
-
ignore_tags = ["AutoTag", "CreatedBy"]
47
-
48
-
# Additional Configuration
49
-
enable_private_link = false
50
-
create_rpk_user = false
51
-
force_destroy_cloud_storage = false
52
-
}
53
-
```
54
-
55
-
## Requirements
56
-
57
-
| Name | Version |
58
-
|------|---------|
59
-
| terraform | >= 1.8.5 |
60
-
| aws | Latest |
61
-
62
-
## Provider Configuration
63
-
64
-
This module requires the AWS provider to be configured:
65
-
66
-
```terraform
67
-
provider "aws" {
68
-
region = var.region
69
-
70
-
ignore_tags {
71
-
keys = var.ignore_tags
72
-
}
73
-
}
74
-
```
75
-
76
-
## Inputs
77
-
78
-
| Name | Description | Type | Default | Required |
| region | The AWS region to deploy resources into |`string`| n/a | yes |
81
-
| aws_account_id | AWS account ID to use (if not already authenticated) |`string`|`""`| no |
82
-
| aws_access_key | AWS access key for the account |`string`| n/a | yes |
83
-
| aws_secret_key | AWS secret key for the account |`string`| n/a | yes |
84
-
| common_prefix | Prefix for naming resources |`string`|`"redpanda"`| no |
85
-
| vpc_id | Existing VPC ID (if not creating a new one) |`string`|`""`| no |
86
-
| vpc_cidr_block | CIDR block for the VPC (if creating a new one) |`string`|`"10.0.0.0/16"`| no |
87
-
| private_subnet_cidrs | CIDRs for private subnets |`list(string)`| See variables.tf | no |
88
-
| private_subnet_ids | IDs of existing private subnets |`list(string)`|`[]`| no |
89
-
| public_subnet_cidrs | CIDRs for public subnets |`list(string)`|`[]`| no |
90
-
| zones | AWS availability zone IDs |`list(string)`| See variables.tf | no |
91
-
| condition_tags | Tags used as conditions in IAM policies |`map(string)`|`{"redpanda-managed": "true"}`| no |
92
-
| default_tags | Tags to apply to all resources |`map(string)`|`{}`| no |
93
-
| ignore_tags | Tags to ignore during resource reconciliation |`list(string)`|`[]`| no |
94
-
| enable_private_link | Enable AWS PrivateLink support |`bool`|`false`| no |
95
-
| create_rpk_user | Create RPK user policies for testing |`bool`|`false`| no |
96
-
| force_destroy_cloud_storage | Force destroy the cloud storage bucket |`bool`|`false`| no |
97
-
| source_cluster_bucket_names | Bucket names of source clusters for read replicas |`set(string)`|`[]`| no |
98
-
| reader_cluster_id | ID of the reader cluster for read replicas |`string`|`""`| no |
99
-
| network_exclude_zone_ids | AZ IDs to exclude from selection |`list(string)`|`[]`| no |
100
-
| cloud_tags | Cloud-specific tags for resources |`map(string)`|`{}`| no |
101
-
102
-
## Outputs
103
-
104
-
| Name | Description |
105
-
|------|-------------|
106
-
| redpanda_agent_role_arn | ARN of the Redpanda Agent IAM role |
107
-
| agent_instance_profile_arn | ARN of the Redpanda Agent instance profile |
108
-
| connectors_node_group_instance_profile_arn | ARN of the Connectors node group instance profile |
109
-
| utility_node_group_instance_profile_arn | ARN of the Utility node group instance profile |
110
-
| redpanda_node_group_instance_profile_arn | ARN of the Redpanda node group instance profile |
111
-
| k8s_cluster_role_arn | ARN of the Kubernetes cluster IAM role |
112
-
| cloud_storage_bucket_arn | ARN of the Redpanda cloud storage S3 bucket |
113
-
| management_bucket_arn | ARN of the management S3 bucket |
114
-
| dynamodb_table_arn | ARN of the DynamoDB table for state locking |
115
-
| vpc_arn | ARN of the VPC |
116
-
| private_subnet_ids | JSON-encoded list of private subnet IDs |
117
-
| redpanda_agent_security_group_arn | ARN of the Redpanda Agent security group |
118
-
| connectors_security_group_arn | ARN of the Connectors security group |
119
-
| redpanda_node_group_security_group_arn | ARN of the Redpanda node group security group |
120
-
| utility_security_group_arn | ARN of the Utility security group |
121
-
| cluster_security_group_arn | ARN of the EKS cluster security group |
122
-
| node_security_group_arn | ARN of the EKS node shared security group |
123
-
| byovpc_rpk_user_policy_arns | JSON-encoded list of RPK user policy ARNs (if enabled) |
124
-
| permissions_boundary_policy_arn | ARN of the permissions boundary policy |
125
-
| private_subnet_arns | List of ARNs of the private subnets |
126
-
127
-
## Resources
128
-
129
-
### IAM Resources
130
-
131
-
The module creates IAM roles for various components:
132
-
133
-
-**Redpanda Agent**: Role for the agent VM that manages the Redpanda cluster
134
-
-**K8s Cluster**: Role for the EKS cluster
135
-
-**Redpanda Node Group**: Role for Redpanda broker nodes
136
-
-**Utility Node Group**: Role for utility nodes (load balancer controller, etc.)
137
-
-**Connectors Node Group**: Role for Redpanda connectors
138
-
139
-
### Networking Resources
140
-
141
-
-**VPC** (optional): Creates a new VPC if `vpc_id` is not provided
142
-
-**Subnets**: Private and public subnets in specified availability zones
143
-
-**NAT Gateway**: For private subnet internet access
144
-
-**Route Tables**: For public and private subnets
145
-
-**S3 Gateway Endpoint**: For efficient S3 access without NAT charges
146
-
147
-
### Security Groups
148
-
149
-
-**Redpanda Agent**: For the agent VM
150
-
-**Connectors**: For connector nodes
151
-
-**Redpanda Node Group**: For Redpanda broker nodes
152
-
-**Utility**: For utility nodes
153
-
-**Cluster**: For the EKS cluster
154
-
-**Node**: Shared security group for EKS nodes
155
-
156
-
### Storage Resources
157
-
158
-
-**Cloud Storage Bucket**: S3 bucket for Redpanda tiered storage
159
-
-**Management Bucket**: S3 bucket for Terraform state and configuration
160
-
-**DynamoDB Table**: For Terraform state locking
161
-
162
-
## Notes
18
+
## Guidance
163
19
164
20
1. Either `private_subnet_ids` or `private_subnet_cidrs` must be provided.
165
21
2. For Private Link support, set `enable_private_link = true`.
166
22
3. The tags specified in `condition_tags` must also be provided during cluster creation.
167
23
4. The module includes proper tag handling for all resources using `default_tags`.
168
24
5. For read replica clusters, configure `source_cluster_bucket_names` and `reader_cluster_id`.
25
+
6. It can be useful to add ignore_tags to your workspace AWS provider declaration to avoid Terraform attempting to remove tags applied by external automation. More information is available here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/resource-tagging#ignoring-changes-in-all-resources
It can be useful to add ignore_tags to your workspace AWS provider declaration to avoid Terraform attempting to remove tags applied by external automation. More information is available here
0 commit comments