Skip to content

Commit

Permalink
others: renamed verrazzano_type to verrazzano_profile to keep with Ve…
Browse files Browse the repository at this point in the history
…rrazzano

        naming concepts

Signed-off-by: Ali Mukadam <[email protected]>
  • Loading branch information
hyder committed Dec 7, 2021
1 parent b5d2048 commit 79a85db
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ssh_private_key_path = "~/.ssh/id_rsa"
ssh_public_key_path = "~/.ssh/id_rsa.pub"
verrazzano_name = "v8o"
verrazzano_type = "dev"
verrazzano_profile = "dev"
verrazzano_version = "1.0.3"
```

Expand Down
6 changes: 3 additions & 3 deletions oke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "oke" {
ssh_public_key_path = var.ssh_public_key_path

# networking
create_drg = var.verrazzano_type == "admin" || var.verrazzano_type == "managed" ? true : false
create_drg = var.verrazzano_profile == "admin" || var.verrazzano_profile == "managed" ? true : false
internet_gateway_route_rules = []
nat_gateway_route_rules = []

Expand All @@ -25,11 +25,11 @@ module "oke" {
vcn_name = var.vcn_name

# bastion host
create_bastion_host = var.verrazzano_type == "managed" ? false : true
create_bastion_host = var.verrazzano_profile == "managed" ? false : true
upgrade_bastion = false

# operator host
create_operator = var.verrazzano_type == "managed" ? false : true
create_operator = var.verrazzano_profile == "managed" ? false : true
enable_operator_instance_principal = true
upgrade_operator = false

Expand Down
6 changes: 3 additions & 3 deletions scripts/install_verrazzano.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

echo "Installing Verrazzano"

if [[ ${verrazzano_type} = "admin" ]]
if [[ ${verrazzano_profile} = "admin" ]]
then
sed -i -e "s?profile: dev?profile: prod?g" verrazzano.yaml
echo "profile type set to prod for an admin cluster"
elif [[ ${verrazzano_type} = "dev" ]]
elif [[ ${verrazzano_profile} = "dev" ]]
then
echo "profile type set to dev for a dev cluster"
elif [[ ${verrazzano_type} = "managed" ]]
elif [[ ${verrazzano_profile} = "managed" ]]
then
sed -i -e "s?profile: dev?profile: managed?g" verrazzano.yaml
echo "profile type set to managed for a managed cluster"
Expand Down
2 changes: 1 addition & 1 deletion templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {
install_verrazzano_template = templatefile("${path.module}/scripts/install_verrazzano.template.sh",
{
verrazzano_name = var.verrazzano_name
verrazzano_type = var.verrazzano_type
verrazzano_profile = var.verrazzano_profile
}
)

Expand Down
2 changes: 1 addition & 1 deletion terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ freeform_tags = {
}

verrazzano_name = "v8o"
verrazzano_type = "dev"
verrazzano_profile = "dev"
verrazzano_version = "1.0.3"
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,12 @@ variable "verrazzano_name" {
type = string
}

variable "verrazzano_type" {
variable "verrazzano_profile" {
default = "dev"
description = "Verrazzano cluster type. Can be set to admin, dev, managed or prod"
type = string
validation {
condition = contains(["admin", "dev", "managed", "prod"], var.verrazzano_type)
condition = contains(["admin", "dev", "managed", "prod"], var.verrazzano_profile)
error_message = "Accepted values are admin, dev, managed or prod."
}
}
Expand Down

0 comments on commit 79a85db

Please sign in to comment.