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

quickstarts,examples: expose cluster_region and clarify #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion docs/quickstarts/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ or
```console
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-east-1
export AWS_DEFAULT_REGION=us-east-1 # This region will be used by the lokoctl S3 backend only
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please avoid the future tense here?

"This region is used by..."

```

### Step 4: Define cluster configuration
Expand All @@ -97,6 +97,8 @@ defined in the configuration file.
#lokocfg.vars
ssh_public_keys = ["public-ssh-key-1", "public-ssh-key-2", ...]

cluster_region = "region-name"

state_s3_bucket = "name-of-the-s3-bucket-to-store-the-cluster-state"
lock_dynamodb_table = "name-of-the-dynamodb-table-for-state-locking"

Expand Down
5 changes: 5 additions & 0 deletions examples/aws-production/cluster.lokocfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ variable "cluster_name" {
default = "lokomotive-cluster"
}

variable "cluster_region" {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable is only used for S3 bucket location?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable configures the region where the cluster is deployed.

The AWS_DEFAULT_REGION env variable is only used for the S3 bucket location in current Lokomotive.

default = "eu-central-1"
}

variable "controllers_count" {
default = 3
}
Expand Down Expand Up @@ -43,6 +47,7 @@ backend "s3" {
cluster "aws" {
asset_dir = pathexpand(var.asset_dir)
cluster_name = var.cluster_name
region = var.cluster_region
controller_count = var.controllers_count
dns_zone = var.dns_zone
dns_zone_id = var.route53_zone_id
Expand Down
4 changes: 4 additions & 0 deletions examples/aws-testing/cluster.lokocfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ variable "cluster_name" {
default = "lokomotive-cluster"
}

variable "cluster_region" {
default = "eu-central-1"
}

variable "controllers_count" {
default = 1
}
Expand Down