Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

fix(tests): Update Lightsail terraform for Integration testing of Instances #1137

Merged
merged 1 commit into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform/lightsail/modules/test/buckets.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "awslightsail_bucket" "awslightsail_bucket" {
name = "${var.prefix}-lightsail-bucket"
name = "${lower(var.prefix)}-lightsail-bucket"
bundle_id = "small_1_0"
}
4 changes: 2 additions & 2 deletions terraform/lightsail/modules/test/containers.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# create a new Lightsail container service
resource "awslightsail_container_service" "awslightsail_container_service" {
name = "${var.prefix}-container-service"
name = "${lower(var.prefix)}-container-service"
power = "nano"
scale = 1
is_disabled = false
tags = {
tags = {
foo1 = "bar1"
foo2 = ""
}
Expand Down
6 changes: 5 additions & 1 deletion terraform/lightsail/modules/test/disk.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
resource "awslightsail_disk" "awslightsail_disk" {
name = "${var.prefix}_awslightsail_disk"
size_in_gb = 8
availability_zone = "us-east-1a"
availability_zone = "us-east-1b"
tags = {
foo1 = "bar1"
foo2 = ""
}
}
15 changes: 12 additions & 3 deletions terraform/lightsail/modules/test/instances.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
# Create a new GitLab Lightsail Instance
# Create a new Lightsail Instance
resource "aws_lightsail_instance" "aws_lightsail_instance" {
name = "${var.prefix}-lightsaleinstance"
name = "${var.prefix}-lightsailinstance"
availability_zone = "us-east-1b"
blueprint_id = "amazon_linux_2"
bundle_id = "nano_2_0"
key_pair_name = aws_lightsail_key_pair.aws_lightsail_key_pair.name
tags = {
foo1 = "bar1"
foo2 = ""
}
}

resource "aws_lightsail_static_ip_attachment" "test" {
static_ip_name = aws_lightsail_static_ip.aws_lightsail_static_ip.id
instance_name = aws_lightsail_instance.aws_lightsail_instance.id
}


resource "awslightsail_lb_attachment" "test" {
load_balancer_name = awslightsail_lb.awslightsail_lb.name
instance_name = aws_lightsail_instance.aws_lightsail_instance.name
}

resource "awslightsail_disk_attachment" "test" {
disk_name = awslightsail_disk.awslightsail_disk.name
instance_name = aws_lightsail_instance.aws_lightsail_instance.name
disk_path = "/dev/xvdf"
}
2 changes: 1 addition & 1 deletion terraform/lightsail/modules/test/lb.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "awslightsail_lb" "awslightsail_lb" {
name = "${var.prefix}_load_ballancer"
name = "${var.prefix}_load_balancer"
health_check_path = "/"
instance_port = "80"
}