Skip to content

Commit cdbe903

Browse files
authored
Fix dnsimple_ds_record incorrect attribute name key_tag (#322)
The docs and code incorrectly referenced `key_tag`. The correct version is `keytag`: - https://developer.dnsimple.com/v2/domains/dnssec/#listDomainDelegationSignerRecords - https://github.com/dnsimple/dnsimple-go/blob/1ae027e1f8856781f387b57c3c0d4c068c23ed26/dnsimple/domains_delegation_signer_records.go#L15 Fixes #321
1 parent c68093e commit cdbe903

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## unreleased
4+
5+
BUG FIXES:
6+
7+
- resource/`dnsimple_ds_record`: Fix attribute name from `keytag` to `key_tag` to match documentation and Terraform naming conventions (#321)
8+
39
## 2.0.0 - 2025-12-15
410

511
BREAKING CHANGES:

internal/framework/resources/domain_ds_record_resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type DsRecordResourceModel struct {
4242
Algorithm types.String `tfsdk:"algorithm"`
4343
Digest types.String `tfsdk:"digest"`
4444
DigestType types.String `tfsdk:"digest_type"`
45-
Keytag types.String `tfsdk:"keytag"`
45+
Keytag types.String `tfsdk:"key_tag"`
4646
PublicKey types.String `tfsdk:"public_key"`
4747
CreatedAt types.String `tfsdk:"created_at"`
4848
UpdatedAt types.String `tfsdk:"updated_at"`
@@ -82,7 +82,7 @@ func (r *DsRecordResource) Schema(_ context.Context, _ resource.SchemaRequest, r
8282
stringplanmodifier.RequiresReplace(),
8383
},
8484
},
85-
"keytag": schema.StringAttribute{
85+
"key_tag": schema.StringAttribute{
8686
Optional: true,
8787
PlanModifiers: []planmodifier.String{
8888
stringplanmodifier.RequiresReplace(),

internal/framework/resources/domain_ds_record_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestAccDomainDsRecordResource(t *testing.T) {
3131
resource.TestCheckResourceAttr(resourceName, "algorithm", "8"),
3232
resource.TestCheckResourceAttr(resourceName, "digest", "C3D49CB83734B22CF3EF9A193B94302FA3BB68013E3E149786D40CDC1BBACD93"),
3333
resource.TestCheckResourceAttr(resourceName, "digest_type", "2"),
34-
resource.TestCheckResourceAttr(resourceName, "keytag", "51301"),
34+
resource.TestCheckResourceAttr(resourceName, "key_tag", "51301"),
3535
resource.TestCheckResourceAttr(resourceName, "public_key", "AwEAAd4gdAYAeCnAsYYStm/eWd6uRn5XvT14D9DDM9TbmCvLKCuRA6WYz7suLAziJ5hvk2I7aTOVK8Wd1fDmVxHXGg0Jd6P2+GQpg7AGghD+oLeg0I7AesSIKO3o1ffr58x6iIsxVZ+fcC7G6vdr/d8oIJ/SZdAvghQnCNmCm49HLoN6bWJWNJIXzmxFrptvfgfB4B+PVzbquZrJ0W10KrD394U="),
3636
resource.TestCheckResourceAttrSet(resourceName, "created_at"),
3737
resource.TestCheckResourceAttrSet(resourceName, "updated_at"),
@@ -94,7 +94,7 @@ resource "dnsimple_ds_record" "test" {
9494
algorithm = "8"
9595
digest = "C3D49CB83734B22CF3EF9A193B94302FA3BB68013E3E149786D40CDC1BBACD93"
9696
digest_type = "2"
97-
keytag = "51301"
97+
key_tag = "51301"
9898
public_key = "AwEAAd4gdAYAeCnAsYYStm/eWd6uRn5XvT14D9DDM9TbmCvLKCuRA6WYz7suLAziJ5hvk2I7aTOVK8Wd1fDmVxHXGg0Jd6P2+GQpg7AGghD+oLeg0I7AesSIKO3o1ffr58x6iIsxVZ+fcC7G6vdr/d8oIJ/SZdAvghQnCNmCm49HLoN6bWJWNJIXzmxFrptvfgfB4B+PVzbquZrJ0W10KrD394U="
9999
}`, domainName)
100100
}

0 commit comments

Comments
 (0)