Skip to content

Commit

Permalink
Merge pull request #747 from cloudflare/dependabot/go_modules/github.…
Browse files Browse the repository at this point in the history
…com/cloudflare/cloudflare-go-0.105.0

build(deps): bump github.com/cloudflare/cloudflare-go from 0.103.0 to 0.105.0
  • Loading branch information
jacobbednarz committed Sep 26, 2024
2 parents c799253 + 3f62a19 commit 7154901
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 30 deletions.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/MakeNowJust/heredoc/v2 v2.0.1
github.com/cloudflare/cloudflare-go v0.103.0
github.com/cloudflare/cloudflare-go v0.105.0
github.com/dnaeon/go-vcr v1.2.0
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hc-install v0.8.1
Expand Down Expand Up @@ -47,14 +47,14 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/cloudflare/cloudflare-go v0.103.0 h1:XXKzgXeUbAo7UTtM4T5wuD2bJPBtNZv7TlZAEy5QI4k=
github.com/cloudflare/cloudflare-go v0.103.0/go.mod h1:0DrjT4g8wgYFYIxhlqR8xi8dNWfyHFGilUkU3+XV8h0=
github.com/cloudflare/cloudflare-go v0.105.0 h1:yu2IatITLZ4dw7/byzRrlE5DfUvtub0k9CHZ5zBlj90=
github.com/cloudflare/cloudflare-go v0.105.0/go.mod h1:pfUQ4PIG4ISI0/Mmc21Bp86UnFU0ktmPf3iTgbSL+cM=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -120,23 +120,23 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
7 changes: 5 additions & 2 deletions internal/app/cf-terraforming/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,12 +711,15 @@ func generateResources() func(cmd *cobra.Command, args []string) {
log.Fatal(err)
}

zone, _ := api.ZoneDetails(context.Background(), identifier.Identifier)

for i := 0; i < resourceCount; i++ {
// Drop the proxiable values as they are not usable
jsonStructData[i].(map[string]interface{})["proxiable"] = nil
jsonStructData[i].(map[string]interface{})["value"] = nil

if jsonStructData[i].(map[string]interface{})["name"].(string) != jsonStructData[i].(map[string]interface{})["zone_name"].(string) {
jsonStructData[i].(map[string]interface{})["name"] = strings.ReplaceAll(jsonStructData[i].(map[string]interface{})["name"].(string), "."+jsonStructData[i].(map[string]interface{})["zone_name"].(string), "")
if jsonStructData[i].(map[string]interface{})["name"].(string) != zone.Name {
jsonStructData[i].(map[string]interface{})["name"] = strings.ReplaceAll(jsonStructData[i].(map[string]interface{})["name"].(string), "."+zone.Name, "")
}
}
case "cloudflare_ruleset":
Expand Down
58 changes: 56 additions & 2 deletions testdata/cloudflare/cloudflare_record.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711
method: GET
response:
body: |
{
"result": {
"id": "0da42c8d2132a9ddaf714f9e7c920711",
"name": "example.com",
"status": "active",
"paused": false,
"type": "full",
"development_mode": 0,
"name_servers": [
"amy.ns.cloudflare.com",
"mark.ns.cloudflare.com"
],
"original_name_servers": [
"abby.ns.cloudflare.com",
"noel.ns.cloudflare.com"
],
"original_registrar": "namecheap, inc. (id: 1068)",
"original_dnshost": null,
"modified_on": "2024-06-06T07:48:29.003893Z",
"created_on": "2021-07-21T03:44:16.375808Z",
"activated_on": "2021-07-21T03:58:43.615595Z",
"plan": {
"id": "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Free Website",
"price": 0,
"currency": "USD",
"frequency": "",
"is_subscribed": false,
"can_subscribe": false,
"legacy_id": "free",
"legacy_discount": false,
"externally_managed": false
}
},
"success": true,
"errors": [],
"messages": []
}
headers:
Content-Type:
- application/json
Vary:
- Accept-Encoding
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
Expand All @@ -15,8 +71,6 @@ interactions:
"result": [
{
"id": "7df6f2a4ff66e0ffd1e2d640cad0527f",
"zone_id": "0da42c8d2132a9ddaf714f9e7c920711",
"zone_name": "example.com",
"name": "example.com",
"type": "A",
"content": "198.51.100.4",
Expand Down
58 changes: 56 additions & 2 deletions testdata/cloudflare/cloudflare_record_caa.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711
method: GET
response:
body: |
{
"result": {
"id": "0da42c8d2132a9ddaf714f9e7c920711",
"name": "example.com",
"status": "active",
"paused": false,
"type": "full",
"development_mode": 0,
"name_servers": [
"amy.ns.cloudflare.com",
"mark.ns.cloudflare.com"
],
"original_name_servers": [
"abby.ns.cloudflare.com",
"noel.ns.cloudflare.com"
],
"original_registrar": "namecheap, inc. (id: 1068)",
"original_dnshost": null,
"modified_on": "2024-06-06T07:48:29.003893Z",
"created_on": "2021-07-21T03:44:16.375808Z",
"activated_on": "2021-07-21T03:58:43.615595Z",
"plan": {
"id": "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Free Website",
"price": 0,
"currency": "USD",
"frequency": "",
"is_subscribed": false,
"can_subscribe": false,
"legacy_id": "free",
"legacy_discount": false,
"externally_managed": false
}
},
"success": true,
"errors": [],
"messages": []
}
headers:
Content-Type:
- application/json
Vary:
- Accept-Encoding
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
Expand All @@ -15,8 +71,6 @@ interactions:
"result": [
{
"id": "372e67954025e0ba6aaa6d586b9e0b59",
"zone_id": "0da42c8d2132a9ddaf714f9e7c920711",
"zone_name": "example.com",
"name": "example.com",
"type": "CAA",
"data": {
Expand Down
58 changes: 56 additions & 2 deletions testdata/cloudflare/cloudflare_record_ptr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711
method: GET
response:
body: |
{
"result": {
"id": "0da42c8d2132a9ddaf714f9e7c920711",
"name": "example.com",
"status": "active",
"paused": false,
"type": "full",
"development_mode": 0,
"name_servers": [
"amy.ns.cloudflare.com",
"mark.ns.cloudflare.com"
],
"original_name_servers": [
"abby.ns.cloudflare.com",
"noel.ns.cloudflare.com"
],
"original_registrar": "namecheap, inc. (id: 1068)",
"original_dnshost": null,
"modified_on": "2024-06-06T07:48:29.003893Z",
"created_on": "2021-07-21T03:44:16.375808Z",
"activated_on": "2021-07-21T03:58:43.615595Z",
"plan": {
"id": "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Free Website",
"price": 0,
"currency": "USD",
"frequency": "",
"is_subscribed": false,
"can_subscribe": false,
"legacy_id": "free",
"legacy_discount": false,
"externally_managed": false
}
},
"success": true,
"errors": [],
"messages": []
}
headers:
Content-Type:
- application/json
Vary:
- Accept-Encoding
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
Expand All @@ -15,8 +71,6 @@ interactions:
"result": [
{
"id": "9635b9083bd5770bf01b27d53c84b484",
"zone_id": "0da42c8d2132a9ddaf714f9e7c920711",
"zone_name": "example.com",
"name": "example.com",
"type": "PTR",
"content": "255.2.0.192.in-addr.arpa",
Expand Down
58 changes: 56 additions & 2 deletions testdata/cloudflare/cloudflare_record_subdomain.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711
method: GET
response:
body: |
{
"result": {
"id": "0da42c8d2132a9ddaf714f9e7c920711",
"name": "example.com",
"status": "active",
"paused": false,
"type": "full",
"development_mode": 0,
"name_servers": [
"amy.ns.cloudflare.com",
"mark.ns.cloudflare.com"
],
"original_name_servers": [
"abby.ns.cloudflare.com",
"noel.ns.cloudflare.com"
],
"original_registrar": "namecheap, inc. (id: 1068)",
"original_dnshost": null,
"modified_on": "2024-06-06T07:48:29.003893Z",
"created_on": "2021-07-21T03:44:16.375808Z",
"activated_on": "2021-07-21T03:58:43.615595Z",
"plan": {
"id": "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Free Website",
"price": 0,
"currency": "USD",
"frequency": "",
"is_subscribed": false,
"can_subscribe": false,
"legacy_id": "free",
"legacy_discount": false,
"externally_managed": false
}
},
"success": true,
"errors": [],
"messages": []
}
headers:
Content-Type:
- application/json
Vary:
- Accept-Encoding
status: 200 OK
code: 200
duration: ""
- request:
body: ""
form: {}
Expand All @@ -15,8 +71,6 @@ interactions:
"result": [
{
"id": "372e67954025e0ba6aaa6d586b9e0b59",
"zone_id": "0da42c8d2132a9ddaf714f9e7c920711",
"zone_name": "example.com",
"name": "subdomain",
"type": "A",
"content": "198.51.100.4",
Expand Down
Loading

0 comments on commit 7154901

Please sign in to comment.