-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: introduced provider config next to provider_meta config
Renamed seed_prefix to guid_seed_addition to clarify its purpose. Renamed unique_seed to guid_seed to clarify that it needs to be globally unique per resource type. Added per-resource-type uniqueness.
- Loading branch information
Showing
51 changed files
with
684 additions
and
636 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
terraform { | ||
required_providers { | ||
value = { | ||
source = "github.com/pseudo-dynamic/value" | ||
version = "0.1.0" | ||
} | ||
} | ||
|
||
provider_meta "value" { | ||
// Module-scoped seed addition. | ||
// {workdir} -> a placeholder (see docs) | ||
guid_seed_addition = "module(is-fully-known)" | ||
} | ||
} | ||
|
||
provider "value" { | ||
// Project-wide seed addition. | ||
// Won't overwrite module-scoped seed addition, | ||
// instead both serve are now considered as seed addition. | ||
guid_seed_addition = "{workdir}" | ||
} |
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,13 +1,15 @@ | ||
// This example is incomplete. Please take a look at provider_meta.tf and shared.tf too! | ||
// This example is complete but there are additional features implemented in terraform.tf! | ||
|
||
resource "value_unknown_proposer" "known" {} | ||
|
||
resource "value_is_fully_known" "known" { | ||
value = "test" | ||
unique_seed = "known" | ||
proposed_unknown = value_unknown_proposer.default.value | ||
guid_seed = "known" | ||
proposed_unknown = value_unknown_proposer.known.value | ||
} | ||
|
||
output "is_known_value" { | ||
value = { | ||
is_fully_known = value_is_fully_known.known.result | ||
fully_known = value_is_fully_known.known.result | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
// This example is incomplete. Please take a look at provider_meta.tf and shared.tf too! | ||
// This example is complete but there are additional features implemented in terraform.tf! | ||
|
||
resource "value_unknown_proposer" "unknown" {} | ||
|
||
resource "value_promise" "unknown" { | ||
value = "test" | ||
} | ||
|
||
resource "value_is_fully_known" "unknown" { | ||
value = value_promise.default.result | ||
unique_seed = "unknown" | ||
proposed_unknown = value_unknown_proposer.default.value | ||
value = value_promise.unknown.result | ||
guid_seed = "unknown" | ||
proposed_unknown = value_unknown_proposer.unknown.value | ||
} | ||
|
||
output "is_unknown_value" { | ||
value = { | ||
is_fully_known = value_is_fully_known.unknown.result | ||
fully_known = value_is_fully_known.unknown.result | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
terraform { | ||
required_providers { | ||
value = { | ||
source = "github.com/pseudo-dynamic/value" | ||
version = "0.1.0" | ||
} | ||
} | ||
|
||
provider_meta "value" { | ||
// Module-scoped seed addition. | ||
// {workdir} -> a placeholder (see docs) | ||
guid_seed_addition = "module(is-known)" | ||
} | ||
} | ||
|
||
provider "value" { | ||
// Project-wide seed addition. | ||
// Won't overwrite module-scoped seed addition, | ||
// instead both serve are now considered as seed addition. | ||
guid_seed_addition = "{workdir}" | ||
} |
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,13 +1,15 @@ | ||
# // This example is incomplete. Please take a look at provider_meta.tf and shared.tf too! | ||
// This example is complete but there are additional features implemented in terraform.tf! | ||
|
||
# resource "value_is_known" "known" { | ||
# value = "test" | ||
# unique_seed = "known" | ||
# proposed_unknown = value_unknown_proposer.default.value | ||
# } | ||
resource "value_unknown_proposer" "known" {} | ||
|
||
# output "is_known_value" { | ||
# value = { | ||
# known = value_is_known.known.result | ||
# } | ||
# } | ||
resource "value_is_known" "known" { | ||
value = "test" | ||
guid_seed = "known" | ||
proposed_unknown = value_unknown_proposer.known.value | ||
} | ||
|
||
output "is_known_value" { | ||
value = { | ||
known = value_is_known.known.result | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
# // This example is incomplete. Please take a look at provider_meta.tf and shared.tf too! | ||
|
||
# resource "value_is_known" "unknown" { | ||
# value = value_promise.default.result | ||
# unique_seed = "unknown" | ||
# proposed_unknown = value_unknown_proposer.default.value | ||
# } | ||
|
||
# output "is_unknown_value" { | ||
# value = { | ||
# known = value_is_known.unknown.result | ||
# } | ||
# } | ||
// This example is complete but there are additional features implemented in terraform.tf! | ||
|
||
resource "value_unknown_proposer" "unknown" {} | ||
|
||
resource "value_promise" "unknown" { | ||
value = "test" | ||
} | ||
|
||
resource "value_is_known" "unknown" { | ||
value = value_promise.unknown.result | ||
guid_seed = "unknown" | ||
proposed_unknown = value_unknown_proposer.unknown.value | ||
} | ||
|
||
output "is_unknown_value" { | ||
value = { | ||
known = value_is_known.unknown.result | ||
} | ||
} |
Oops, something went wrong.