Skip to content

Commit 4b4ea37

Browse files
authored
feat: add key pair configuration for AutoMQ BYOC console and update environment version to 1.5.12 (#30)
1 parent e13dcc1 commit 4b4ea37

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

main.tf

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ resource "aws_instance" "automq_byoc_console" {
1111
volume_type = "gp3"
1212
}
1313

14+
key_name = var.automq_byoc_env_console_key_name
15+
1416
tags = {
1517
Name = "automq-byoc-console-${var.automq_byoc_env_id}"
1618
automqVendor = "automq"
@@ -32,6 +34,11 @@ resource "aws_instance" "automq_byoc_console" {
3234
})
3335
}
3436

37+
data "aws_key_pair" "select" {
38+
count = var.automq_byoc_env_console_key_name != "" ? 1 : 0
39+
key_name = var.automq_byoc_env_console_key_name
40+
}
41+
3542
resource "aws_ebs_volume" "data_volume" {
3643
availability_zone = data.aws_subnet.public_subnet_info.availability_zone
3744
size = 20

variables.tf

+8-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ variable "automq_byoc_ec2_instance_type" {
5757
variable "automq_byoc_env_version" {
5858
description = "Set the version for the AutoMQ BYOC environment console. It is recommended to keep the default value, which is the latest version. Historical release note reference [document](https://docs.automq.com/automq-cloud/release-notes)."
5959
type = string
60-
default = "1.5.7"
60+
default = "1.5.12"
61+
}
62+
63+
variable "automq_byoc_env_console_key_name" {
64+
description = "Specify the key pair name for accessing the AutoMQ BYOC environment console. If not specified, the console will be deployed without a key pair."
65+
type = string
66+
default = ""
6167
}
6268

6369
variable "use_custom_ami" {
@@ -80,4 +86,4 @@ variable "automq_byoc_default_deploy_type" {
8086
}
8187
type = string
8288
default = "vm"
83-
}
89+
}

0 commit comments

Comments
 (0)