-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjust resource base name logic `var.worker_pool_id` has historically been effectively a free text field where users can enter any string usable as a worker pool identifier. For example, the pool's _name_ (rather than its ID). With the module's new support for an autoscaler, this doesn't work. The autoscaler requires the pool's _ID_. Make three changes: 0. Rename `local.namespace` to `local.base_name`. This is a less ambiguous term. 1. Add variable validation for `var.worker_pool_id` to ensure a real ID (ULID) is provided. 2. Add `var.base_name` which can optionally override the default local.base_name logic. * Update variables.tf * Update docs * update docs Updated the version of the module variable test variable test number2 Updated test variable for amd64 Updated test variable Updated variables for all tests Updated config file Updated config file variable Updated iam example and config file variable Updated config variables --------- Co-authored-by: Alex Jurkiewicz <[email protected]>
- Loading branch information
1 parent
6dade54
commit 164dff5
Showing
13 changed files
with
49 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
version: 1 | ||
module_version: 2.0.0 | ||
module_version: 2.1.0 | ||
tests: | ||
- name: AMD64-based workerpool | ||
project_root: examples/amd64 | ||
environment: | ||
TF_VAR_spacelift_api_key_id: "EXAMPLE0VOYU49U485BMZZVAWXU59VOW2" | ||
TF_VAR_spacelift_api_key_secret: "EXAMPLEf7anuofh4b6a4e43aplqt49099606de2mzbq4391tj1d3dc9872q23z8fvctu4kh" | ||
TF_VAR_spacelift_api_key_endpoint: "https://example.app.spacelift.io" | ||
TF_VAR_worker_pool_id: "01HBD5QZ932J8EEH5GTBM1QMAS" | ||
|
||
- name: ARM64-based workerpool | ||
project_root: examples/arm64 | ||
environment: | ||
TF_VAR_spacelift_api_key_id: "EXAMPLE0VOYU49U485BMZZVAWXU59VOW2" | ||
TF_VAR_spacelift_api_key_secret: "EXAMPLEf7anuofh4b6a4e43aplqt49099606de2mzbq4391tj1d3dc9872q23z8fvctu4kh" | ||
TF_VAR_spacelift_api_key_endpoint: "https://example.app.spacelift.io" | ||
TF_VAR_worker_pool_id: "01HBD5QZ932J8AEH5GTBM1QMAS" | ||
|
||
- name: Custom IAM Role | ||
project_root: examples/custom-iam-role | ||
environment: | ||
TF_VAR_spacelift_api_key_id: "EXAMPLE0VOYU49U485BMZZVAWXU59VOW2" | ||
TF_VAR_spacelift_api_key_secret: "EXAMPLEf7anuofh4b6a4e43aplqt49099606de2mzbq4391tj1d3dc9872q23z8fvctu4kh" | ||
TF_VAR_spacelift_api_key_endpoint: "https://example.app.spacelift.io" | ||
TF_VAR_worker_pool_id: "01HBD5QZ932J8CEH5GTBM1QMAS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
locals { | ||
base_name = var.base_name == null ? "sp5ft-${var.worker_pool_id}" : var.base_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters