From f1df003bca450d0842ed0d487488efcdceeafb86 Mon Sep 17 00:00:00 2001
From: Sean Ellefson <scellef@gmail.com>
Date: Thu, 22 Sep 2022 16:34:16 -0500
Subject: [PATCH 1/2] Truncating names on character-limited AWS resource

LB and Target Groups names are limited to 32-characters:

* https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateLoadBalancer.html

Encountered an edge-case where the TF code tried to name my resources
"marmoset" which ran afoul of this limitation.
---
 deployment/aws/aws/lb.tf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/deployment/aws/aws/lb.tf b/deployment/aws/aws/lb.tf
index 6e60b60..07e07ab 100644
--- a/deployment/aws/aws/lb.tf
+++ b/deployment/aws/aws/lb.tf
@@ -1,5 +1,5 @@
 resource "aws_lb" "controller" {
-  name               = "${var.tag}-controller-${random_pet.test.id}"
+  name               = substr("${var.tag}-controller-${random_pet.test.id}", 0, 31)
   load_balancer_type = "network"
   internal           = false
   subnets            = aws_subnet.public.*.id
@@ -10,7 +10,7 @@ resource "aws_lb" "controller" {
 }
 
 resource "aws_lb_target_group" "controller" {
-  name     = "${var.tag}-controller-${random_pet.test.id}"
+  name     = substr("${var.tag}-controller-${random_pet.test.id}", 0, 31)
   port     = 9200
   protocol = "TCP"
   vpc_id   = aws_vpc.main.id

From 19d536eeb453d329908296c87cf6d730c420a62d Mon Sep 17 00:00:00 2001
From: Sean Ellefson <scellef@gmail.com>
Date: Fri, 23 Sep 2022 09:08:12 -0500
Subject: [PATCH 2/2] Removing extraneous line, attempts to set string on
 read-only attribute

---
 deployment/aws/aws/cert.tf | 1 -
 1 file changed, 1 deletion(-)

diff --git a/deployment/aws/aws/cert.tf b/deployment/aws/aws/cert.tf
index 419d77a..208e9be 100644
--- a/deployment/aws/aws/cert.tf
+++ b/deployment/aws/aws/cert.tf
@@ -3,7 +3,6 @@ resource "tls_private_key" "boundary" {
 }
 
 resource "tls_self_signed_cert" "boundary" {
-  key_algorithm   = "RSA"
   private_key_pem = tls_private_key.boundary.private_key_pem
 
   subject {