File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,3 +38,4 @@ terraform.rc
3838.env
3939.envrc
4040.DS_Store
41+ .vscode
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ resource "aws_instance" "gateway_ec2" {
5353 instance_type = var. instance_type
5454 subnet_id = data. aws_subnet . subnet . id
5555 vpc_security_group_ids = [aws_security_group . sg . id ]
56- user_data = base64encode (local. user_data )
56+ user_data = base64encode (local. user_data )
5757 tags = merge (local. default_tags , {
58- Name = " sdm-gw-01 "
58+ Name = var.gateway_instance_name
5959 })
6060
6161 metadata_options {
Original file line number Diff line number Diff line change @@ -26,4 +26,10 @@ output "ec2_instance_public_ip" {
2626output "ec2_instance_public_dns" {
2727 description = " EC2 instance public DNS"
2828 value = aws_instance. gateway_ec2 . public_dns
29+ }
30+
31+ output "gateway_instance_name" {
32+ description = " Name of the StrongDM gateway instance"
33+ value = aws_instance. gateway_ec2 . tags [" Name" ]
34+
2935}
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ variable "instance_type" {
4444 default = " t3.medium"
4545}
4646
47+ variable "gateway_instance_name" {
48+ description = " The name of the gateway instance"
49+ type = string
50+ default = " sdm-gw-01"
51+ }
52+
4753variable "SDM_ADMIN_TOKEN" {
4854 description = " The StrongDM admin token"
4955 type = string
You can’t perform that action at this time.
0 commit comments