fix(domain): a little more ergonomic DNS record configuration #39
+344
−43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds
dns_record_a
,dns_record_aaaa
, anddns_record_cname
fields to the output ofdeno_domain
resource so that the following steps where DNS records are added can reference them by the record types likecname
instead of indexes.Currently a typical configuration looks like this, where DNS records registration uses indexes such as
[0]
to get values to be set. This works, but definitely is not best because the length ofdns_records
is unclear from the type definition, plus we cannot tell which record corresponds to which record type.With this commit, these issues are resolved and now we can write like below. One can also choose not to use
for_each
if they wish.The old attribute
dns_record
is now marked as deprecated but remains unchanged for compatibility. We may delete it before stabilizing the provider.Fixes #17