Skip to content

Commit

Permalink
moritz feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Oct 25, 2023
1 parent 2157372 commit 9e84f27
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 0 additions & 4 deletions terraform/aws-constellation/variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
variable "name" {
type = string
description = "Name of your Constellation"
validation {
condition = length(var.name) <= 10
error_message = "The length of the name of the Constellation must be <= 10 characters"
}
}

variable "image" {
Expand Down
8 changes: 3 additions & 5 deletions terraform/constellation-cluster/install-constellation.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash
VERSION="latest"
if ! command -v constellation &> /dev/null; then
if ! [ -f ./constellation ]; then
OS=$(uname -s)
ARCH=$(uname -m)

VERSION="latest"
URL=""

if [[ $OS == "Darwin" ]]; then
Expand All @@ -21,10 +20,9 @@ if ! command -v constellation &> /dev/null; then
fi

if [ -z "$URL" ]; then
echo "Unsupported OS or architecture"
echo "OS \"$OS\" and/or architecture \"$ARCH\" is not supported."
exit 1
else
curl -o constellation -LO $URL
sudo install constellation /usr/local/bin/constellation
fi
fi
5 changes: 2 additions & 3 deletions terraform/constellation-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ resource "terraform_data" "config_generate" {

# TODO how to handle CSP specific config without CSP specific input?
resource "terraform_data" "csp_config" {
count = var.csp == "aws" ? 1 : 0
provisioner "local-exec" {
command = <<EOT
if [ "${var.csp}" == "aws" ]; then
Expand Down Expand Up @@ -70,7 +69,7 @@ resource "terraform_data" "config" {
}

depends_on = [
terraform_data.config_generate
terraform_data.config_generate, terraform_data.csp_config
]
}

Expand Down Expand Up @@ -103,6 +102,6 @@ resource "terraform_data" "apply" {
}

depends_on = [
terraform_data.infra_state, terraform_data.config
terraform_data.infra_state, terraform_data.config, terraform_data.ensure_cli
]
}

0 comments on commit 9e84f27

Please sign in to comment.