Skip to content

Commit

Permalink
Update variable name, add required provider, and remove quotes
Browse files Browse the repository at this point in the history
Signed-off-by: Cari Albritton <cari.albritton@kaleido.io>
  • Loading branch information
calbritt committed Oct 4, 2023
1 parent 5bd9104 commit 897b6b6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
9 changes: 8 additions & 1 deletion examples/env_with_dxe/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
This creates suite of environments using all available
environment types and consensus methods.
*/
terraform {
required_providers {
kaleido = {
source = "kaleido-io/kaleido"
}
}
}

provider "kaleido" {
api = "https://console${var.kaleido_region}.kaleido.io/api/v1"
Expand Down Expand Up @@ -33,7 +40,7 @@ resource "kaleido_environment" "env" {
consortium_id = "${kaleido_consortium.consortium.id}"
multi_region = "${var.multi_region}"
name = "${var.env_name}"
env_type = "${var.provider}"
env_type = "${var.provider_type}"
consensus_type = "${var.consensus}"
description = "${var.env_description}"
}
Expand Down
26 changes: 13 additions & 13 deletions examples/env_with_dxe/variables.tf
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
variable "kaleido_api_key" {
type = "string"
type = string
description = "Kaleido API Key"
}

variable "kaleido_region" {
type = "string"
type = string
description = "Can be '-ap' for Sydney, or '-eu' for Frankfurt. Defaults to US"
default = ""
}

variable "provider" {
type = "string"
variable "provider_type" {
type = string
default = "pantheon"
description = "Protocol implementation to deploy."
}

variable "consensus" {
type = "string"
type = string
default = "ibft"
description = "Consensus mechanism."
}

variable "multi_region" {
type = "string"
type = string
default = true
description = "Make the environment multi-region compatible to support additional regions, now or in the future"
}

variable "node_size" {
type = "string"
type = string
default = "small"
description = "Size of the node"
}

variable "node_count" {
type = "string"
type = string
default = 4
description = "Count of nodes to create - each will have its own membership"
}

variable "service_count" {
type = "string"
type = string
default = 1
description = "Count of services to create - each will have its own membership"
}

variable "consortium_name" {
type = "string"
type = string
default = "My Business Network"
}

variable "env_name" {
type = "string"
type = string
default = "Development"
}

variable "env_description" {
type = "string"
type = string
default = "Created with Terraform"
}
variable "network_description" {
type = "string"
type = string
default = "Modern Business Network - Built on Kaleido"
}

0 comments on commit 897b6b6

Please sign in to comment.