@@ -1240,146 +1240,20 @@ Has the same requirements as the AWS BYOC Cluster in addition to ARNs for numero
1240
1240
``` terraform
1241
1241
provider "redpanda" {}
1242
1242
1243
- variable "management_bucket_arn" {
1244
- default = "arn:aws:s3:::rp-879326078624-us-east-2-mgmt-20250225235918572600000009"
1243
+ provider aws {
1244
+ region = var.region
1245
1245
}
1246
1246
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"
1254
1249
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"
1264
1254
]
1265
1255
}
1266
1256
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
- }
1383
1257
1384
1258
resource "redpanda_resource_group" "test" {
1385
1259
name = var.resource_group_name
@@ -1394,16 +1268,16 @@ resource "redpanda_network" "test" {
1394
1268
customer_managed_resources = {
1395
1269
aws = {
1396
1270
management_bucket = {
1397
- arn = var .management_bucket_arn
1271
+ arn = redpanda_byovpc .management_bucket_arn
1398
1272
}
1399
1273
dynamodb_table = {
1400
- arn = var.dynamodb_table_arn
1274
+ arn = red
1401
1275
}
1402
1276
vpc = {
1403
- arn = var .vpc_arn
1277
+ arn = redpanda_byovpc .vpc_arn
1404
1278
}
1405
1279
private_subnets = {
1406
- arns = var .private_subnet_arns
1280
+ arns = redpanda_byovpc .private_subnet_arns
1407
1281
}
1408
1282
}
1409
1283
}
@@ -1426,46 +1300,46 @@ resource "redpanda_cluster" "test" {
1426
1300
customer_managed_resources = {
1427
1301
aws = {
1428
1302
aws_permissions_boundary_policy_arn = {
1429
- arn = var .permissions_boundary_policy_arn
1303
+ arn = redpanda_byovpc .permissions_boundary_policy_arn
1430
1304
}
1431
1305
agent_instance_profile = {
1432
- arn = var .agent_instance_profile_arn
1306
+ arn = redpanda_byovpc .agent_instance_profile_arn
1433
1307
}
1434
1308
connectors_node_group_instance_profile = {
1435
- arn = var .connectors_node_group_instance_profile_arn
1309
+ arn = redpanda_byovpc .connectors_node_group_instance_profile_arn
1436
1310
}
1437
1311
utility_node_group_instance_profile = {
1438
- arn = var .utility_node_group_instance_profile_arn
1312
+ arn = redpanda_byovpc .utility_node_group_instance_profile_arn
1439
1313
}
1440
1314
redpanda_node_group_instance_profile = {
1441
- arn = var .redpanda_node_group_instance_profile_arn
1315
+ arn = redpanda_byovpc .redpanda_node_group_instance_profile_arn
1442
1316
}
1443
1317
k8s_cluster_role = {
1444
- arn = var .k8s_cluster_role_arn
1318
+ arn = redpanda_byovpc .k8s_cluster_role_arn
1445
1319
}
1446
1320
redpanda_agent_security_group = {
1447
- arn = var .redpanda_agent_security_group_arn
1321
+ arn = redpanda_byovpc .redpanda_agent_security_group_arn
1448
1322
}
1449
1323
connectors_security_group = {
1450
- arn = var .connectors_security_group_arn
1324
+ arn = redpanda_byovpc .connectors_security_group_arn
1451
1325
}
1452
1326
redpanda_node_group_security_group = {
1453
- arn = var .redpanda_node_group_security_group_arn
1327
+ arn = redpanda_byovpc .redpanda_node_group_security_group_arn
1454
1328
}
1455
1329
utility_security_group = {
1456
- arn = var .utility_security_group_arn
1330
+ arn = redpanda_byovpc .utility_security_group_arn
1457
1331
}
1458
1332
cluster_security_group = {
1459
- arn = var .cluster_security_group_arn
1333
+ arn = redpanda_byovpc .cluster_security_group_arn
1460
1334
}
1461
1335
node_security_group = {
1462
- arn = var .node_security_group_arn
1336
+ arn = redpanda_byovpc .node_security_group_arn
1463
1337
}
1464
1338
cloud_storage_bucket = {
1465
- arn = var .cloud_storage_bucket_arn
1339
+ arn = redpanda_byovpc .cloud_storage_bucket_arn
1466
1340
}
1467
1341
permissions_boundary_policy = {
1468
- arn = var .permissions_boundary_policy_arn
1342
+ arn = redpanda_byovpc .permissions_boundary_policy_arn
1469
1343
}
1470
1344
}
1471
1345
}
@@ -1496,6 +1370,68 @@ resource "redpanda_acl" "test" {
1496
1370
permission_type = "ALLOW"
1497
1371
cluster_api_url = redpanda_cluster.test.cluster_api_url
1498
1372
}
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
+ }
1499
1435
```
1500
1436
1501
1437
## Limitations
0 commit comments