Skip to content

Commit c2ea075

Browse files
authored
update example n readme (#260)
1 parent c381e3f commit c2ea075

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ repository] support and pinning a fixed reference. For example, you might
1717
consume the AWS Nomad client module as follows:
1818

1919
```terraform
20-
module "my-aws-nomad-clients" {
21-
# Pin release to 4.1.0 (for example) and use /nomad-aws subdirectory
22-
source = "git::https://github.com/CircleCI-Public/server-terraform.git//nomad-aws?ref=4.1.0"
20+
module "nomad" {
21+
# Pin release to 4.9.0 (for example) and use /nomad-aws subdirectory
22+
source = "git::https://github.com/CircleCI-Public/server-terraform.git//nomad-aws?ref=4.9.0"
2323
2424
# Other variables here...
2525
}
2626
```
2727

28-
> Note the use of `ref=4.1.0` to select a specific git tag and
28+
> Note the use of `ref=4.9.0` to select a specific git tag and
2929
> `//nomad-aws` to select the `nomad-aws` module.
3030
3131
[generic git repository]: https://www.terraform.io/docs/language/modules/sources.html#generic-git-repository

nomad-aws/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ provider "aws" {
2323
region = "us-west-1"
2424
}
2525
26-
module "nomad_clients" {
26+
module "nomad" {
2727
# We strongly recommend pinning the version using ref=<<release tag>> as is done here
28-
source = "git::https://github.com/CircleCI-Public/server-terraform.git//nomad-aws?ref=4.0.0"
28+
source = "git::https://github.com/CircleCI-Public/server-terraform.git//nomad-aws?ref=4.9.0"
2929
3030
# Number of nomad clients to run
3131
nodes = 4
@@ -57,14 +57,15 @@ module "nomad_clients" {
5757
}
5858
5959
output "nomad" {
60-
value = module.nomad_clients
60+
value = module.nomad
6161
sensitive = true
6262
}
6363
```
6464

6565
There are more examples in the [examples](./examples/) directory.
6666
- [Basic example](./examples/basic/main.tf)
6767
- [IRSA example](./examples/irsa/main.tf)
68+
- [External Nomad Server example](./examples/nomad-server/main.tf)
6869

6970
---
7071

nomad-aws/examples/basic/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module "vpc" {
2727
enable_dns_hostnames = true
2828
}
2929

30-
module "nomad-aws" {
30+
module "nomad" {
3131
source = "../.."
3232

3333
# Number of nomad clients to run
@@ -57,5 +57,5 @@ module "nomad-aws" {
5757
}
5858

5959
output "nomad_module" {
60-
value = module.nomad-aws
60+
value = module.nomad
6161
}

nomad-aws/examples/externalized-nomad-servers/main.tf renamed to nomad-aws/examples/nomad-server/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ module "nomad-aws" {
5757

5858
# Externalized Nomad Servers
5959
deploy_nomad_server_instances = true
60-
server_public_ip = true
60+
server_public_ip = true # if false, the servers will use the private IP address
6161
allow_ssh = true
6262
ssh_key = "<your-public-key>"
6363
server_machine_type = "t3a.micro"
6464
max_server_instances = 7
6565
desired_server_instances = 3
6666
aws_region = "us-east-1"
67+
client_public_ip = true # if false, the clients will use the private IP address
6768
}
6869

6970
output "nomad_module" {

nomad-gcp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ provider "google-beta" {
1414
zone = "<< GCP compute zone to deploy nomad clients >>""
1515
}
1616
17-
module "nomad_clients" {
17+
module "nomad" {
1818
# We strongly recommend pinning the version using ref=<<release tag>> as is done here
1919
source = "git::https://github.com/CircleCI-Public/server-terraform.git//nomad-gcp?ref=4.9.0"
2020
@@ -26,7 +26,7 @@ module "nomad_clients" {
2626
}
2727
2828
output "module" {
29-
value = module.nomad_clients
29+
value = module.nomad
3030
}
3131
```
3232

0 commit comments

Comments
 (0)