Skip to content

Commit

Permalink
Merge pull request #3220 from janik-cloudflare/remove-locked
Browse files Browse the repository at this point in the history
Remove "locked" flag of DNS records
  • Loading branch information
jacobbednarz committed Apr 2, 2024
2 parents 145ad96 + 538c28d commit 83d936f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/3220.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
data_source/record: Remove `locked` flag which is always false
```
1 change: 0 additions & 1 deletion docs/data-sources/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ data "cloudflare_record" "example" {
### Read-Only

- `id` (String) The ID of this resource.
- `locked` (Boolean) Locked status of the found DNS record.
- `proxiable` (Boolean) Proxiable status of the found DNS record.
- `proxied` (Boolean) Proxied status of the found DNS record.
- `ttl` (Number) TTL of the found DNS record.
Expand Down
6 changes: 0 additions & 6 deletions internal/sdkv2provider/data_source_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ func dataSourceCloudflareRecord() *schema.Resource {
Computed: true,
Description: "Proxiable status of the found DNS record.",
},
"locked": {
Type: schema.TypeBool,
Computed: true,
Description: "Locked status of the found DNS record.",
},
"zone_name": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -125,7 +120,6 @@ func dataSourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData,
d.Set("proxied", record.Proxied)
d.Set("ttl", record.TTL)
d.Set("proxiable", record.Proxiable)
d.Set("locked", record.Locked)
d.Set("zone_name", record.ZoneName)

if record.Priority != nil {
Expand Down
3 changes: 0 additions & 3 deletions internal/sdkv2provider/data_source_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func TestAccCloudflareRecordDataSource(t *testing.T) {
resource.TestCheckResourceAttr(name, "proxied", "false"),
resource.TestCheckResourceAttr(name, "ttl", "1"),
resource.TestCheckResourceAttr(name, "proxiable", "true"),
resource.TestCheckResourceAttr(name, "locked", "false"),
resource.TestCheckResourceAttr(name, "zone_name", domain),
),
},
Expand All @@ -54,7 +53,6 @@ func TestAccCloudflareRecordDataSourceTXT(t *testing.T) {
resource.TestCheckResourceAttr(name, "proxied", "false"),
resource.TestCheckResourceAttr(name, "ttl", "1"),
resource.TestCheckResourceAttr(name, "proxiable", "false"),
resource.TestCheckResourceAttr(name, "locked", "false"),
resource.TestCheckResourceAttr(name, "zone_name", domain),
),
},
Expand All @@ -81,7 +79,6 @@ func TestAccCloudflareRecordDataSourceMX(t *testing.T) {
resource.TestCheckResourceAttr(name, "proxied", "false"),
resource.TestCheckResourceAttr(name, "ttl", "1"),
resource.TestCheckResourceAttr(name, "proxiable", "false"),
resource.TestCheckResourceAttr(name, "locked", "false"),
resource.TestCheckResourceAttr(name, "zone_name", domain),
resource.TestCheckResourceAttr(name, "priority", "10"),
),
Expand Down

0 comments on commit 83d936f

Please sign in to comment.