-
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.
Pull subdomain info from Nullstone instead of calculating.
- Loading branch information
Showing
7 changed files
with
40 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# 0.1.1 (Dec 14, 2024) | ||
* Pull subdomain info from Nullstone instead of calculating. | ||
* Upgrade `ns` terraform provider. | ||
|
||
# 0.1.0 (Dec 13, 2024) | ||
* Initial draft |
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
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
data "ns_subdomain" "this" { | ||
stack_id = data.ns_workspace.this.stack_id | ||
block_id = data.ns_workspace.this.block_id | ||
env_id = data.ns_workspace.this.env_id | ||
} | ||
|
||
locals { | ||
subdomain_dns_name = data.ns_subdomain.this.dns_name | ||
subdomain_part = data.ns_subdomain.this.subdomain_name | ||
fqdn = data.ns_subdomain.this.fqdn | ||
|
||
// zone_id refers to google_dns_managed_zone.this.name; however, we need this variable to wait on the resource to be created | ||
// We're going to take google_dns_managed_zone.this.id and parse out the name (since id is computed during creation) | ||
// Format: projects/{{project}}/managedZones/{{name}} | ||
subdomain_zone_id = regex("^projects/[^/]+/managedZones/([^/]+)$", google_dns_managed_zone.this.id)[0] | ||
|
||
subdomain_name = trimsuffix(google_dns_managed_zone.this.dns_name, ".") | ||
subdomain_nameservers = [for ns in google_dns_managed_zone.this.name_servers : trimsuffix(ns, ".")] | ||
} |