Skip to content

Commit 26ccdc1

Browse files
committed
fix: example cleanup
1 parent dc4fdfa commit 26ccdc1

File tree

3 files changed

+177
-406
lines changed

3 files changed

+177
-406
lines changed

docs/resources/cluster.md

Lines changed: 88 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,146 +1240,20 @@ Has the same requirements as the AWS BYOC Cluster in addition to ARNs for numero
12401240
```terraform
12411241
provider "redpanda" {}
12421242
1243-
variable "management_bucket_arn" {
1244-
default = "arn:aws:s3:::rp-879326078624-us-east-2-mgmt-20250225235918572600000009"
1243+
provider aws {
1244+
region = var.region
12451245
}
12461246
1247-
variable "dynamodb_table_arn" {
1248-
default = "arn:aws:dynamodb:us-east-2:879326078624:table/rp-879326078624-us-east-2-mgmt-tflock-tjhc470imx"
1249-
}
1250-
1251-
variable "vpc_arn" {
1252-
default = "arn:aws:ec2:us-east-2:879326078624:vpc/vpc-0503833a1083ea5fd"
1253-
}
1247+
module "redpanda_byovpc" {
1248+
source = "redpanda-data/redpanda-byovpc/aws"
12541249
1255-
variable "private_subnet_arns" {
1256-
type = list(string)
1257-
default = [
1258-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-085d9ca4d4a3b8234",
1259-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-0facdafdad2b1b22e",
1260-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-0315e9b25f16aafdb",
1261-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-01165942af996f138",
1262-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-06885141d4dc59d85",
1263-
"arn:aws:ec2:us-east-2:879326078624:subnet/subnet-00df5d655183e7d20"
1250+
region = var.region
1251+
aws_account_id = "879326078624"
1252+
public_subnet_cidrs = [
1253+
"10.0.16.0/20", "10.0.32.0/20", "10.0.48.0/20"
12641254
]
12651255
}
12661256
1267-
variable "permissions_boundary_policy_arn" {
1268-
default = "arn:aws:iam::879326078624:policy/redpanda-agent-boundary-20250225235919694500000019"
1269-
}
1270-
1271-
variable "agent_instance_profile_arn" {
1272-
default = "arn:aws:iam::879326078624:instance-profile/redpanda-agent-20250225235919028600000014"
1273-
}
1274-
1275-
variable "connectors_node_group_instance_profile_arn" {
1276-
default = "arn:aws:iam::879326078624:instance-profile/redpanda-connect-2025022523591892010000000e"
1277-
}
1278-
1279-
variable "utility_node_group_instance_profile_arn" {
1280-
default = "arn:aws:iam::879326078624:instance-profile/redpanda-util-20250225235918953200000010"
1281-
}
1282-
1283-
variable "redpanda_node_group_instance_profile_arn" {
1284-
default = "arn:aws:iam::879326078624:instance-profile/redpanda-rp-20250225235918976100000011"
1285-
}
1286-
1287-
variable "k8s_cluster_role_arn" {
1288-
default = "arn:aws:iam::879326078624:role/redpanda-cluster-20250225235918054800000006"
1289-
}
1290-
1291-
variable "redpanda_agent_security_group_arn" {
1292-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-0ec96ed0903732325"
1293-
}
1294-
1295-
variable "connectors_security_group_arn" {
1296-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-00559db2df4b2f0b3"
1297-
}
1298-
1299-
variable "redpanda_node_group_security_group_arn" {
1300-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-08cb0feabb7f8dad3"
1301-
}
1302-
1303-
variable "utility_security_group_arn" {
1304-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-0a69ef8471564a7fe"
1305-
}
1306-
1307-
variable "cluster_security_group_arn" {
1308-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-0d9368cd6a722a4df"
1309-
}
1310-
1311-
variable "node_security_group_arn" {
1312-
default = "arn:aws:ec2:us-east-2:879326078624:security-group/sg-0f8d41dd76c2cb52d"
1313-
}
1314-
1315-
variable "cloud_storage_bucket_arn" {
1316-
default = "arn:aws:s3:::redpanda-cloud-storage-20250305231154426300000001"
1317-
}
1318-
1319-
variable "byovpc_rpk_user_policy_arns" {
1320-
default = "[]"
1321-
}
1322-
1323-
# Existing variables from original configuration
1324-
variable "resource_group_name" {
1325-
default = "testname"
1326-
}
1327-
1328-
variable "network_name" {
1329-
default = "testname"
1330-
}
1331-
1332-
variable "cluster_name" {
1333-
default = "testname"
1334-
}
1335-
1336-
variable "region" {
1337-
default = "us-east-2"
1338-
}
1339-
1340-
variable "zones" {
1341-
default = ["use2-az1", "use2-az2", "use2-az3"]
1342-
}
1343-
1344-
variable "cloud_provider" {
1345-
default = "aws"
1346-
}
1347-
1348-
variable "throughput_tier" {
1349-
default = "tier-1-aws-v2-x86"
1350-
}
1351-
1352-
variable "user_name" {
1353-
default = "test-username"
1354-
}
1355-
1356-
variable "user_pw" {
1357-
default = "password"
1358-
}
1359-
1360-
variable "mechanism" {
1361-
default = "scram-sha-256"
1362-
}
1363-
1364-
variable "topic_name" {
1365-
default = "test-topic"
1366-
}
1367-
1368-
variable "partition_count" {
1369-
default = 3
1370-
}
1371-
1372-
variable "replication_factor" {
1373-
default = 3
1374-
}
1375-
1376-
variable "aws_access_key" {
1377-
type = string
1378-
}
1379-
1380-
variable "aws_secret_key" {
1381-
type = string
1382-
}
13831257
13841258
resource "redpanda_resource_group" "test" {
13851259
name = var.resource_group_name
@@ -1394,16 +1268,16 @@ resource "redpanda_network" "test" {
13941268
customer_managed_resources = {
13951269
aws = {
13961270
management_bucket = {
1397-
arn = var.management_bucket_arn
1271+
arn = redpanda_byovpc.management_bucket_arn
13981272
}
13991273
dynamodb_table = {
1400-
arn = var.dynamodb_table_arn
1274+
arn = red
14011275
}
14021276
vpc = {
1403-
arn = var.vpc_arn
1277+
arn = redpanda_byovpc.vpc_arn
14041278
}
14051279
private_subnets = {
1406-
arns = var.private_subnet_arns
1280+
arns = redpanda_byovpc.private_subnet_arns
14071281
}
14081282
}
14091283
}
@@ -1426,46 +1300,46 @@ resource "redpanda_cluster" "test" {
14261300
customer_managed_resources = {
14271301
aws = {
14281302
aws_permissions_boundary_policy_arn = {
1429-
arn = var.permissions_boundary_policy_arn
1303+
arn = redpanda_byovpc.permissions_boundary_policy_arn
14301304
}
14311305
agent_instance_profile = {
1432-
arn = var.agent_instance_profile_arn
1306+
arn = redpanda_byovpc.agent_instance_profile_arn
14331307
}
14341308
connectors_node_group_instance_profile = {
1435-
arn = var.connectors_node_group_instance_profile_arn
1309+
arn = redpanda_byovpc.connectors_node_group_instance_profile_arn
14361310
}
14371311
utility_node_group_instance_profile = {
1438-
arn = var.utility_node_group_instance_profile_arn
1312+
arn = redpanda_byovpc.utility_node_group_instance_profile_arn
14391313
}
14401314
redpanda_node_group_instance_profile = {
1441-
arn = var.redpanda_node_group_instance_profile_arn
1315+
arn = redpanda_byovpc.redpanda_node_group_instance_profile_arn
14421316
}
14431317
k8s_cluster_role = {
1444-
arn = var.k8s_cluster_role_arn
1318+
arn = redpanda_byovpc.k8s_cluster_role_arn
14451319
}
14461320
redpanda_agent_security_group = {
1447-
arn = var.redpanda_agent_security_group_arn
1321+
arn = redpanda_byovpc.redpanda_agent_security_group_arn
14481322
}
14491323
connectors_security_group = {
1450-
arn = var.connectors_security_group_arn
1324+
arn = redpanda_byovpc.connectors_security_group_arn
14511325
}
14521326
redpanda_node_group_security_group = {
1453-
arn = var.redpanda_node_group_security_group_arn
1327+
arn = redpanda_byovpc.redpanda_node_group_security_group_arn
14541328
}
14551329
utility_security_group = {
1456-
arn = var.utility_security_group_arn
1330+
arn = redpanda_byovpc.utility_security_group_arn
14571331
}
14581332
cluster_security_group = {
1459-
arn = var.cluster_security_group_arn
1333+
arn = redpanda_byovpc.cluster_security_group_arn
14601334
}
14611335
node_security_group = {
1462-
arn = var.node_security_group_arn
1336+
arn = redpanda_byovpc.node_security_group_arn
14631337
}
14641338
cloud_storage_bucket = {
1465-
arn = var.cloud_storage_bucket_arn
1339+
arn = redpanda_byovpc.cloud_storage_bucket_arn
14661340
}
14671341
permissions_boundary_policy = {
1468-
arn = var.permissions_boundary_policy_arn
1342+
arn = redpanda_byovpc.permissions_boundary_policy_arn
14691343
}
14701344
}
14711345
}
@@ -1496,6 +1370,68 @@ resource "redpanda_acl" "test" {
14961370
permission_type = "ALLOW"
14971371
cluster_api_url = redpanda_cluster.test.cluster_api_url
14981372
}
1373+
1374+
1375+
# Existing variables from original configuration
1376+
variable "resource_group_name" {
1377+
default = "testname"
1378+
}
1379+
1380+
variable "network_name" {
1381+
default = "testname"
1382+
}
1383+
1384+
variable "cluster_name" {
1385+
default = "testname"
1386+
}
1387+
1388+
variable "region" {
1389+
default = "us-east-2"
1390+
}
1391+
1392+
variable "zones" {
1393+
default = ["use2-az1", "use2-az2", "use2-az3"]
1394+
}
1395+
1396+
variable "cloud_provider" {
1397+
default = "aws"
1398+
}
1399+
1400+
variable "throughput_tier" {
1401+
default = "tier-1-aws-v2-x86"
1402+
}
1403+
1404+
variable "user_name" {
1405+
default = "test-username"
1406+
}
1407+
1408+
variable "user_pw" {
1409+
default = "password"
1410+
}
1411+
1412+
variable "mechanism" {
1413+
default = "scram-sha-256"
1414+
}
1415+
1416+
variable "topic_name" {
1417+
default = "test-topic"
1418+
}
1419+
1420+
variable "partition_count" {
1421+
default = 3
1422+
}
1423+
1424+
variable "replication_factor" {
1425+
default = 3
1426+
}
1427+
1428+
variable "aws_access_key" {
1429+
type = string
1430+
}
1431+
1432+
variable "aws_secret_key" {
1433+
type = string
1434+
}
14991435
```
15001436

15011437
## Limitations

0 commit comments

Comments
 (0)