forked from mirrors/terraform-provider-binarylane
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e3b30a49b | |||
| 45d7ab450c | |||
| c5b250becf | |||
| 10070095e1 |
@@ -32,13 +32,13 @@ jobs:
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
|
||||
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
||||
id: import_gpg
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
|
||||
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
|
||||
with:
|
||||
args: release --clean
|
||||
env:
|
||||
|
||||
@@ -35,8 +35,20 @@ data "binarylane_server_firewall_rules" "example" {
|
||||
Read-Only:
|
||||
|
||||
- `action` (String) The action to take when there is a match on this rule.
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| drop | Traffic matching this rule will be dropped. |
|
||||
| accept | Traffic matching this rule will be accepted. |
|
||||
- `description` (String) A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. "Block access to RDP" or "Allow access from HQ".
|
||||
- `destination_addresses` (List of String) The destination addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
- `destination_ports` (List of String) The destination ports to match for this rule. Leave null or empty to match on all ports.
|
||||
- `protocol` (String) The protocol to match for this rule.
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| all | This rule will match any protocol. |
|
||||
| icmp | This rule will match ICMP traffic only. |
|
||||
| tcp | This rule will match TCP traffic only. |
|
||||
| udp | This rule will match UDP traffic only. |
|
||||
- `source_addresses` (List of String) The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
|
||||
@@ -63,6 +63,12 @@ Optional:
|
||||
- `path` (String) Leave null to accept the default '/' path.
|
||||
- `protocol` (String) Leave null to accept the default HTTP protocol.
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| http | The health check will be performed via HTTP. |
|
||||
| https | The health check will be performed via HTTPS. |
|
||||
| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |
|
||||
|
||||
|
||||
<a id="nestedatt--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
@@ -46,8 +46,20 @@ resource "binarylane_server_firewall_rules" "example" {
|
||||
Required:
|
||||
|
||||
- `action` (String) The action to take when there is a match on this rule.
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| drop | Traffic matching this rule will be dropped. |
|
||||
| accept | Traffic matching this rule will be accepted. |
|
||||
- `destination_addresses` (List of String) The destination addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
- `protocol` (String) The protocol to match for this rule.
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| all | This rule will match any protocol. |
|
||||
| icmp | This rule will match ICMP traffic only. |
|
||||
| tcp | This rule will match TCP traffic only. |
|
||||
| udp | This rule will match UDP traffic only. |
|
||||
- `source_addresses` (List of String) The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
|
||||
Optional:
|
||||
|
||||
@@ -14,7 +14,7 @@ require (
|
||||
github.com/hashicorp/terraform-plugin-framework-validators v0.17.0
|
||||
github.com/hashicorp/terraform-plugin-go v0.26.0
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0
|
||||
github.com/hashicorp/terraform-plugin-testing v1.11.0
|
||||
github.com/hashicorp/terraform-plugin-testing v1.12.0
|
||||
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1
|
||||
github.com/oapi-codegen/runtime v1.1.1
|
||||
)
|
||||
@@ -43,13 +43,13 @@ require (
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/hashicorp/cli v1.1.7 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
|
||||
github.com/hashicorp/go-cty v1.5.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.3 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.2 // indirect
|
||||
@@ -62,7 +62,7 @@ require (
|
||||
github.com/hashicorp/terraform-exec v0.22.0 // indirect
|
||||
github.com/hashicorp/terraform-json v0.24.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-codegen-spec v0.2.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 // indirect
|
||||
github.com/hashicorp/terraform-registry-address v0.2.4 // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
|
||||
github.com/hashicorp/yamux v0.1.2 // indirect
|
||||
@@ -101,13 +101,13 @@ require (
|
||||
github.com/yuin/goldmark-meta v1.1.0 // indirect
|
||||
github.com/zclconf/go-cty v1.16.2 // indirect
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
|
||||
golang.org/x/crypto v0.35.0 // indirect
|
||||
golang.org/x/crypto v0.36.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect
|
||||
golang.org/x/mod v0.22.0 // indirect
|
||||
golang.org/x/net v0.36.0 // indirect
|
||||
golang.org/x/sync v0.11.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
golang.org/x/net v0.38.0 // indirect
|
||||
golang.org/x/sync v0.12.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
golang.org/x/text v0.23.0 // indirect
|
||||
golang.org/x/tools v0.22.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
|
||||
|
||||
@@ -101,8 +101,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
@@ -117,8 +117,8 @@ github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuD
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
|
||||
github.com/hashicorp/go-cty v1.5.0 h1:EkQ/v+dDNUqnuVpmS5fPqyY71NXVgT5gf32+57xY8g0=
|
||||
github.com/hashicorp/go-cty v1.5.0/go.mod h1:lFUCG5kd8exDobgSfyj4ONE/dc822kiYMguVKdHGMLM=
|
||||
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
@@ -161,10 +161,10 @@ github.com/hashicorp/terraform-plugin-go v0.26.0 h1:cuIzCv4qwigug3OS7iKhpGAbZTiy
|
||||
github.com/hashicorp/terraform-plugin-go v0.26.0/go.mod h1:+CXjuLDiFgqR+GcrM5a2E2Kal5t5q2jb0E3D57tTdNY=
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 h1:wyKCCtn6pBBL46c1uIIBNUOWlNfYXfXpVo16iDyLp8Y=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0/go.mod h1:B0Al8NyYVr8Mp/KLwssKXG1RqnTk7FySqSn4fRuLNgw=
|
||||
github.com/hashicorp/terraform-plugin-testing v1.11.0 h1:MeDT5W3YHbONJt2aPQyaBsgQeAIckwPX41EUHXEn29A=
|
||||
github.com/hashicorp/terraform-plugin-testing v1.11.0/go.mod h1:WNAHQ3DcgV/0J+B15WTE6hDvxcUdkPPpnB1FR3M910U=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 h1:WNMsTLkZf/3ydlgsuXePa3jvZFwAJhruxTxP/c1Viuw=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1/go.mod h1:P6o64QS97plG44iFzSM6rAn6VJIC/Sy9a9IkEtl79K4=
|
||||
github.com/hashicorp/terraform-plugin-testing v1.12.0 h1:tpIe+T5KBkA1EO6aT704SPLedHUo55RenguLHcaSBdI=
|
||||
github.com/hashicorp/terraform-plugin-testing v1.12.0/go.mod h1:jbDQUkT9XRjAh1Bvyufq+PEH1Xs4RqIdpOQumSgSXBM=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.4 h1:JXu/zHB2Ymg/TGVCRu10XqNa4Sh2bWcqCNyKWjnCPJA=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.4/go.mod h1:tUNYTVyCtU4OIGXXMDp7WNcJ+0W1B4nmstVDgHMjfAU=
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
|
||||
@@ -332,8 +332,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
|
||||
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
|
||||
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
|
||||
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
|
||||
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc=
|
||||
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
@@ -350,14 +350,14 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
|
||||
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
|
||||
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
|
||||
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
|
||||
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
|
||||
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -382,20 +382,19 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
|
||||
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
|
||||
@@ -151,8 +151,10 @@ type ClientInterface interface {
|
||||
// GetDomainsNameservers request
|
||||
GetDomainsNameservers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
|
||||
// PostDomainsRefreshNameserverCache request
|
||||
PostDomainsRefreshNameserverCache(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
// PostDomainsRefreshNameserverCacheWithBody request with any body
|
||||
PostDomainsRefreshNameserverCacheWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
|
||||
PostDomainsRefreshNameserverCache(ctx context.Context, body PostDomainsRefreshNameserverCacheJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||||
|
||||
// DeleteDomainsDomainName request
|
||||
DeleteDomainsDomainName(ctx context.Context, domainName struct {
|
||||
@@ -843,8 +845,20 @@ func (c *Client) GetDomainsNameservers(ctx context.Context, reqEditors ...Reques
|
||||
return c.Client.Do(req)
|
||||
}
|
||||
|
||||
func (c *Client) PostDomainsRefreshNameserverCache(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||||
req, err := NewPostDomainsRefreshNameserverCacheRequest(c.Server)
|
||||
func (c *Client) PostDomainsRefreshNameserverCacheWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||||
req, err := NewPostDomainsRefreshNameserverCacheRequestWithBody(c.Server, contentType, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req = req.WithContext(ctx)
|
||||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c.Client.Do(req)
|
||||
}
|
||||
|
||||
func (c *Client) PostDomainsRefreshNameserverCache(ctx context.Context, body PostDomainsRefreshNameserverCacheJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||||
req, err := NewPostDomainsRefreshNameserverCacheRequest(c.Server, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -3490,8 +3504,19 @@ func NewGetDomainsNameserversRequest(server string) (*http.Request, error) {
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// NewPostDomainsRefreshNameserverCacheRequest generates requests for PostDomainsRefreshNameserverCache
|
||||
func NewPostDomainsRefreshNameserverCacheRequest(server string) (*http.Request, error) {
|
||||
// NewPostDomainsRefreshNameserverCacheRequest calls the generic PostDomainsRefreshNameserverCache builder with application/json body
|
||||
func NewPostDomainsRefreshNameserverCacheRequest(server string, body PostDomainsRefreshNameserverCacheJSONRequestBody) (*http.Request, error) {
|
||||
var bodyReader io.Reader
|
||||
buf, err := json.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bodyReader = bytes.NewReader(buf)
|
||||
return NewPostDomainsRefreshNameserverCacheRequestWithBody(server, "application/json", bodyReader)
|
||||
}
|
||||
|
||||
// NewPostDomainsRefreshNameserverCacheRequestWithBody generates requests for PostDomainsRefreshNameserverCache with any type of body
|
||||
func NewPostDomainsRefreshNameserverCacheRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||||
var err error
|
||||
|
||||
serverURL, err := url.Parse(server)
|
||||
@@ -3509,11 +3534,13 @@ func NewPostDomainsRefreshNameserverCacheRequest(server string) (*http.Request,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
||||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Add("Content-Type", contentType)
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
||||
@@ -8445,8 +8472,10 @@ type ClientWithResponsesInterface interface {
|
||||
// GetDomainsNameserversWithResponse request
|
||||
GetDomainsNameserversWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDomainsNameserversResponse, error)
|
||||
|
||||
// PostDomainsRefreshNameserverCacheWithResponse request
|
||||
PostDomainsRefreshNameserverCacheWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error)
|
||||
// PostDomainsRefreshNameserverCacheWithBodyWithResponse request with any body
|
||||
PostDomainsRefreshNameserverCacheWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error)
|
||||
|
||||
PostDomainsRefreshNameserverCacheWithResponse(ctx context.Context, body PostDomainsRefreshNameserverCacheJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error)
|
||||
|
||||
// DeleteDomainsDomainNameWithResponse request
|
||||
DeleteDomainsDomainNameWithResponse(ctx context.Context, domainName struct {
|
||||
@@ -11585,9 +11614,17 @@ func (c *ClientWithResponses) GetDomainsNameserversWithResponse(ctx context.Cont
|
||||
return ParseGetDomainsNameserversResponse(rsp)
|
||||
}
|
||||
|
||||
// PostDomainsRefreshNameserverCacheWithResponse request returning *PostDomainsRefreshNameserverCacheResponse
|
||||
func (c *ClientWithResponses) PostDomainsRefreshNameserverCacheWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error) {
|
||||
rsp, err := c.PostDomainsRefreshNameserverCache(ctx, reqEditors...)
|
||||
// PostDomainsRefreshNameserverCacheWithBodyWithResponse request with arbitrary body returning *PostDomainsRefreshNameserverCacheResponse
|
||||
func (c *ClientWithResponses) PostDomainsRefreshNameserverCacheWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error) {
|
||||
rsp, err := c.PostDomainsRefreshNameserverCacheWithBody(ctx, contentType, body, reqEditors...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ParsePostDomainsRefreshNameserverCacheResponse(rsp)
|
||||
}
|
||||
|
||||
func (c *ClientWithResponses) PostDomainsRefreshNameserverCacheWithResponse(ctx context.Context, body PostDomainsRefreshNameserverCacheJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error) {
|
||||
rsp, err := c.PostDomainsRefreshNameserverCache(ctx, body, reqEditors...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -412,6 +412,9 @@ const (
|
||||
|
||||
// Account defines model for Account.
|
||||
type Account struct {
|
||||
// AdditionalIpv4Limit The maximum additional IPv4 addresses this account may assign across all servers. You may contact support to request this limit be increased.
|
||||
AdditionalIpv4Limit *int32 `json:"additional_ipv4_limit,omitempty"`
|
||||
|
||||
// ConfiguredPaymentMethods The payment methods that are configured (available) for this account.
|
||||
ConfiguredPaymentMethods *[]PaymentMethod `json:"configured_payment_methods,omitempty"`
|
||||
|
||||
@@ -477,6 +480,16 @@ type Action struct {
|
||||
ResourceId *int64 `json:"resource_id"`
|
||||
|
||||
// ResourceType The resource type (if any) associated with this action.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | server | Server |
|
||||
// | load-balancer | Load Balancer |
|
||||
// | ssh-key | SSH Key |
|
||||
// | vpc | Virtual Private Network |
|
||||
// | image | Backup or Operating System Image |
|
||||
// | registered-domain-name | Registered Domain Name |
|
||||
//
|
||||
ResourceType *ResourceType `json:"resource_type"`
|
||||
|
||||
// ResultData Returned information from a completed action. For example: a successful completed 'uptime' action will have the uptime value in this field.
|
||||
@@ -558,6 +571,12 @@ type AddDiskType string
|
||||
// AdvancedFirewallRule defines model for AdvancedFirewallRule.
|
||||
type AdvancedFirewallRule struct {
|
||||
// Action The action to take when there is a match on this rule.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | drop | Traffic matching this rule will be dropped. |
|
||||
// | accept | Traffic matching this rule will be accepted. |
|
||||
//
|
||||
Action AdvancedFirewallRuleAction `json:"action" tfsdk:"action"`
|
||||
|
||||
// Description A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. "Block access to RDP" or "Allow access from HQ".
|
||||
@@ -570,6 +589,14 @@ type AdvancedFirewallRule struct {
|
||||
DestinationPorts *[]string `json:"destination_ports" tfsdk:"destination_ports"`
|
||||
|
||||
// Protocol The protocol to match for this rule.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | all | This rule will match any protocol. |
|
||||
// | icmp | This rule will match ICMP traffic only. |
|
||||
// | tcp | This rule will match TCP traffic only. |
|
||||
// | udp | This rule will match UDP traffic only. |
|
||||
//
|
||||
Protocol AdvancedFirewallRuleProtocol `json:"protocol" tfsdk:"protocol"`
|
||||
|
||||
// SourceAddresses The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
@@ -592,6 +619,41 @@ type AdvancedFirewallRuleAction string
|
||||
// | udp | This rule will match UDP traffic only. |
|
||||
type AdvancedFirewallRuleProtocol string
|
||||
|
||||
// AdvancedFirewallRuleRequest defines model for AdvancedFirewallRuleRequest.
|
||||
type AdvancedFirewallRuleRequest struct {
|
||||
// Action The action to take when there is a match on this rule.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | drop | Traffic matching this rule will be dropped. |
|
||||
// | accept | Traffic matching this rule will be accepted. |
|
||||
//
|
||||
Action AdvancedFirewallRuleAction `json:"action" tfsdk:"action"`
|
||||
|
||||
// Description A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. "Block access to RDP" or "Allow access from HQ".
|
||||
Description *string `json:"description" tfsdk:"description"`
|
||||
|
||||
// DestinationAddresses The destination addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
DestinationAddresses []string `json:"destination_addresses" tfsdk:"destination_addresses"`
|
||||
|
||||
// DestinationPorts The destination ports to match for this rule. Leave null or empty to match on all ports.
|
||||
DestinationPorts *[]string `json:"destination_ports" tfsdk:"destination_ports"`
|
||||
|
||||
// Protocol The protocol to match for this rule.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | all | This rule will match any protocol. |
|
||||
// | icmp | This rule will match ICMP traffic only. |
|
||||
// | tcp | This rule will match TCP traffic only. |
|
||||
// | udp | This rule will match UDP traffic only. |
|
||||
//
|
||||
Protocol AdvancedFirewallRuleProtocol `json:"protocol" tfsdk:"protocol"`
|
||||
|
||||
// SourceAddresses The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
|
||||
SourceAddresses []string `json:"source_addresses" tfsdk:"source_addresses"`
|
||||
}
|
||||
|
||||
// AdvancedFirewallRulesResponse defines model for AdvancedFirewallRulesResponse.
|
||||
type AdvancedFirewallRulesResponse struct {
|
||||
// FirewallRules The advanced firewall rules for the selected server. Please note that the order of the rules is critical as the first matching rule is applied, and if no rules match the traffic is permitted.
|
||||
@@ -605,6 +667,18 @@ type AdvancedServerFeatures struct {
|
||||
|
||||
// MachineType The machine_type (corresponding to a KVM version) used for this server.
|
||||
// A null value indicates automatic selection of the best KVM machine type supported by the host node.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | pc_i440fx_1point5 | PC i440FX 1.5 |
|
||||
// | pc_i440fx_2point11 | PC i440FX 2.11 |
|
||||
// | pc_i440fx_4point1 | PC i440FX 4.1 |
|
||||
// | pc_i440fx_4point2 | PC i440FX 4.2 |
|
||||
// | pc_i440fx_5point0 | PC i440FX 5.0 |
|
||||
// | pc_i440fx_5point1 | PC i440FX 5.1 |
|
||||
// | pc_i440fx_7point2 | PC i440FX 7.2 |
|
||||
// | pc_i440fx_8point2 | PC i440FX 8.2 |
|
||||
//
|
||||
MachineType *VmMachineType `json:"machine_type"`
|
||||
|
||||
// ProcessorModel The ID of the processor model (and therefore CPU flags) available for this server.
|
||||
@@ -784,6 +858,18 @@ type ChangeAdvancedFeatures struct {
|
||||
EnabledAdvancedFeatures *[]string `json:"enabled_advanced_features"`
|
||||
|
||||
// MachineType Do not provide or set to null to keep existing machine type.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | pc_i440fx_1point5 | PC i440FX 1.5 |
|
||||
// | pc_i440fx_2point11 | PC i440FX 2.11 |
|
||||
// | pc_i440fx_4point1 | PC i440FX 4.1 |
|
||||
// | pc_i440fx_4point2 | PC i440FX 4.2 |
|
||||
// | pc_i440fx_5point0 | PC i440FX 5.0 |
|
||||
// | pc_i440fx_5point1 | PC i440FX 5.1 |
|
||||
// | pc_i440fx_7point2 | PC i440FX 7.2 |
|
||||
// | pc_i440fx_8point2 | PC i440FX 8.2 |
|
||||
//
|
||||
MachineType *VmMachineType `json:"machine_type"`
|
||||
|
||||
// ProcessorModel Do not provide or set to null to keep existing processor model.
|
||||
@@ -791,6 +877,14 @@ type ChangeAdvancedFeatures struct {
|
||||
Type ChangeAdvancedFeaturesType `json:"type"`
|
||||
|
||||
// VideoDevice Do not provide or set to null to keep existing video device.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | cirrus-logic | Cirrus Logic GD5446 |
|
||||
// | standard | Standard VGA with VESA 2.0 extensions |
|
||||
// | virtio | Virtio VGA (800x600) |
|
||||
// | virtio-wide | Virtio VGA (1600x900) |
|
||||
//
|
||||
VideoDevice *VideoDevice `json:"video_device"`
|
||||
}
|
||||
|
||||
@@ -800,7 +894,7 @@ type ChangeAdvancedFeaturesType string
|
||||
// ChangeAdvancedFirewallRules Change the Advanced Firewall Rules for a Server
|
||||
type ChangeAdvancedFirewallRules struct {
|
||||
// FirewallRules A list of rules for the server. NB: that any existing rules that are not included will be removed. Submit an empty list to clear all rules.
|
||||
FirewallRules []AdvancedFirewallRule `json:"firewall_rules"`
|
||||
FirewallRules []AdvancedFirewallRuleRequest `json:"firewall_rules"`
|
||||
Type ChangeAdvancedFirewallRulesType `json:"type"`
|
||||
}
|
||||
|
||||
@@ -1387,16 +1481,16 @@ type DomainRecord struct {
|
||||
Weight *int32 `json:"weight"`
|
||||
}
|
||||
|
||||
// DomainRecordRequest If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values.
|
||||
// DomainRecordRequest defines model for DomainRecordRequest.
|
||||
type DomainRecordRequest struct {
|
||||
// Data A general data field that has different functions depending on the record type.
|
||||
Data *string `json:"data"`
|
||||
Data string `json:"data"`
|
||||
|
||||
// Flags An unsigned integer between 0-255 that is only relevant for CAA records.
|
||||
Flags *int32 `json:"flags"`
|
||||
|
||||
// Name The subdomain for this record. Use @ for records on the domain itself, and * to create a wildcard record.
|
||||
Name *string `json:"name"`
|
||||
Name string `json:"name"`
|
||||
|
||||
// Port A port value that is only relevant for SRV records.
|
||||
Port *int32 `json:"port"`
|
||||
@@ -1411,7 +1505,20 @@ type DomainRecordRequest struct {
|
||||
Ttl *int32 `json:"ttl"`
|
||||
|
||||
// Type The type of the DNS record.
|
||||
Type *DomainRecordType `json:"type"`
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | A | Map an IPv4 address to a hostname. |
|
||||
// | AAAA | Map an IPv6 address to a hostname. |
|
||||
// | CAA | Restrict which certificate authorities are permitted to issue certificates for a domain. |
|
||||
// | CNAME | Define an alias for your canonical hostname. |
|
||||
// | MX | Define the mail exchanges that handle mail for the domain. |
|
||||
// | NS | Define the nameservers that manage the domain. |
|
||||
// | SOA | The Start of Authority record for the zone. |
|
||||
// | SRV | Specify a server by hostname and port to handle a service or services. |
|
||||
// | TXT | Define a string of text that is associated with a hostname. |
|
||||
//
|
||||
Type DomainRecordType `json:"type"`
|
||||
|
||||
// Weight The weight value that is only relevant for SRV records.
|
||||
Weight *int32 `json:"weight"`
|
||||
@@ -1445,6 +1552,12 @@ type DomainRecordsResponse struct {
|
||||
Meta Meta `json:"meta"`
|
||||
}
|
||||
|
||||
// DomainRefreshRequest defines model for DomainRefreshRequest.
|
||||
type DomainRefreshRequest struct {
|
||||
// DomainNames The domain names to refresh.
|
||||
DomainNames []string `json:"domain_names"`
|
||||
}
|
||||
|
||||
// DomainRequest defines model for DomainRequest.
|
||||
type DomainRequest struct {
|
||||
// IpAddress An optional IPv4 address that will be used to create an A record for the root domain.
|
||||
@@ -1502,6 +1615,13 @@ type HealthCheck struct {
|
||||
Path *string `json:"path"`
|
||||
|
||||
// Protocol Leave null to accept the default HTTP protocol.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | http | The health check will be performed via HTTP. |
|
||||
// | https | The health check will be performed via HTTPS. |
|
||||
// | both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |
|
||||
//
|
||||
Protocol *HealthCheckProtocol `json:"protocol"`
|
||||
}
|
||||
|
||||
@@ -2767,12 +2887,28 @@ type TakeBackup struct {
|
||||
BackupIdToReplace *int64 `json:"backup_id_to_replace"`
|
||||
|
||||
// BackupType If replacement_strategy is anything other than 'specified', this must be provided.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | daily | A backup which is scheduled to be taken each day. |
|
||||
// | weekly | A backup which is scheduled to be taken each week. |
|
||||
// | monthly | A backup which is scheduled to be taken each month. |
|
||||
// | temporary | A backup which is created on demand and only retained for a maximum of seven days. |
|
||||
//
|
||||
BackupType *BackupSlot `json:"backup_type"`
|
||||
|
||||
// Label An optional label to identify the backup.
|
||||
Label *string `json:"label"`
|
||||
|
||||
// ReplacementStrategy The strategy for selecting which backup to replace (if any).
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | none | Do not replace any existing backup: use a free slot of the provided backup type. If there are no free slots an error will occur. |
|
||||
// | specified | Replace the specific backup id provided. |
|
||||
// | oldest | Use any free slots of the provided backup type, and if there are no free slots replace the oldest unlocked and un-attached backup of the provided backup type. |
|
||||
// | newest | Use any free slots of the provided backup type, and if there are no free slots replace the newest unlocked and un-attached backup of the provided backup type. |
|
||||
//
|
||||
ReplacementStrategy BackupReplacementStrategy `json:"replacement_strategy"`
|
||||
Type TakeBackupType `json:"type"`
|
||||
}
|
||||
@@ -2866,6 +3002,49 @@ type UnpaidFailedInvoicesResponse struct {
|
||||
Invoices *[]Invoice `json:"invoices,omitempty"`
|
||||
}
|
||||
|
||||
// UpdateDomainRecordRequest Any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values.
|
||||
type UpdateDomainRecordRequest struct {
|
||||
// Data A general data field that has different functions depending on the record type.
|
||||
Data *string `json:"data"`
|
||||
|
||||
// Flags An unsigned integer between 0-255 that is only relevant for CAA records.
|
||||
Flags *int32 `json:"flags"`
|
||||
|
||||
// Name The subdomain for this record. Use @ for records on the domain itself, and * to create a wildcard record.
|
||||
Name *string `json:"name"`
|
||||
|
||||
// Port A port value that is only relevant for SRV records.
|
||||
Port *int32 `json:"port"`
|
||||
|
||||
// Priority A priority value that is only relevant for SRV and MX records.
|
||||
Priority *int32 `json:"priority"`
|
||||
|
||||
// Tag A parameter tag that is only relevant for CAA records.
|
||||
Tag *string `json:"tag"`
|
||||
|
||||
// Ttl This value is the time to live for the record, in seconds.
|
||||
Ttl *int32 `json:"ttl"`
|
||||
|
||||
// Type The type of the DNS record.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | A | Map an IPv4 address to a hostname. |
|
||||
// | AAAA | Map an IPv6 address to a hostname. |
|
||||
// | CAA | Restrict which certificate authorities are permitted to issue certificates for a domain. |
|
||||
// | CNAME | Define an alias for your canonical hostname. |
|
||||
// | MX | Define the mail exchanges that handle mail for the domain. |
|
||||
// | NS | Define the nameservers that manage the domain. |
|
||||
// | SOA | The Start of Authority record for the zone. |
|
||||
// | SRV | Specify a server by hostname and port to handle a service or services. |
|
||||
// | TXT | Define a string of text that is associated with a hostname. |
|
||||
//
|
||||
Type *DomainRecordType `json:"type"`
|
||||
|
||||
// Weight The weight value that is only relevant for SRV records.
|
||||
Weight *int32 `json:"weight"`
|
||||
}
|
||||
|
||||
// UpdateLoadBalancerRequest defines model for UpdateLoadBalancerRequest.
|
||||
type UpdateLoadBalancerRequest struct {
|
||||
// ForwardingRules The rules that control which traffic the load balancer will forward to servers in the pool. Leave null to accept a default "HTTP" only forwarding rule.
|
||||
@@ -2912,12 +3091,28 @@ type UploadImageRequest struct {
|
||||
BackupIdToReplace *int64 `json:"backup_id_to_replace"`
|
||||
|
||||
// BackupType If replacement_strategy is anything other than 'specified', this must be provided.
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | daily | A backup which is scheduled to be taken each day. |
|
||||
// | weekly | A backup which is scheduled to be taken each week. |
|
||||
// | monthly | A backup which is scheduled to be taken each month. |
|
||||
// | temporary | A backup which is created on demand and only retained for a maximum of seven days. |
|
||||
//
|
||||
BackupType *BackupSlot `json:"backup_type"`
|
||||
|
||||
// Label An optional label to identify the backup.
|
||||
Label *string `json:"label"`
|
||||
|
||||
// ReplacementStrategy The strategy for selecting which backup to replace (if any).
|
||||
//
|
||||
// | Value | Description |
|
||||
// | ----- | ----------- |
|
||||
// | none | Do not replace any existing backup: use a free slot of the provided backup type. If there are no free slots an error will occur. |
|
||||
// | specified | Replace the specific backup id provided. |
|
||||
// | oldest | Use any free slots of the provided backup type, and if there are no free slots replace the oldest unlocked and un-attached backup of the provided backup type. |
|
||||
// | newest | Use any free slots of the provided backup type, and if there are no free slots replace the newest unlocked and un-attached backup of the provided backup type. |
|
||||
//
|
||||
ReplacementStrategy BackupReplacementStrategy `json:"replacement_strategy"`
|
||||
|
||||
// Url The source URL for the image to upload. Only HTTP and HTTPS sources are currently supported.
|
||||
@@ -3080,6 +3275,9 @@ type GetDomainsParams struct {
|
||||
// PostDomainsJSONBody defines parameters for PostDomains.
|
||||
type PostDomainsJSONBody = DomainRequest
|
||||
|
||||
// PostDomainsRefreshNameserverCacheJSONBody defines parameters for PostDomainsRefreshNameserverCache.
|
||||
type PostDomainsRefreshNameserverCacheJSONBody = DomainRefreshRequest
|
||||
|
||||
// DeleteDomainsDomainNameParamsDomainName0 defines parameters for DeleteDomainsDomainName.
|
||||
type DeleteDomainsDomainNameParamsDomainName0 = int
|
||||
|
||||
@@ -3147,7 +3345,7 @@ type GetDomainsDomainNameRecordsRecordIdParamsDomainName0 = int
|
||||
type GetDomainsDomainNameRecordsRecordIdParamsDomainName1 = string
|
||||
|
||||
// PutDomainsDomainNameRecordsRecordIdJSONBody defines parameters for PutDomainsDomainNameRecordsRecordId.
|
||||
type PutDomainsDomainNameRecordsRecordIdJSONBody = DomainRecordRequest
|
||||
type PutDomainsDomainNameRecordsRecordIdJSONBody = UpdateDomainRecordRequest
|
||||
|
||||
// PutDomainsDomainNameRecordsRecordIdParamsDomainName0 defines parameters for PutDomainsDomainNameRecordsRecordId.
|
||||
type PutDomainsDomainNameRecordsRecordIdParamsDomainName0 = int
|
||||
@@ -3428,6 +3626,9 @@ type PostActionsActionIdProceedJSONRequestBody = PostActionsActionIdProceedJSONB
|
||||
// PostDomainsJSONRequestBody defines body for PostDomains for application/json ContentType.
|
||||
type PostDomainsJSONRequestBody = PostDomainsJSONBody
|
||||
|
||||
// PostDomainsRefreshNameserverCacheJSONRequestBody defines body for PostDomainsRefreshNameserverCache for application/json ContentType.
|
||||
type PostDomainsRefreshNameserverCacheJSONRequestBody = PostDomainsRefreshNameserverCacheJSONBody
|
||||
|
||||
// PostDomainsDomainNameRecordsJSONRequestBody defines body for PostDomainsDomainNameRecords for application/json ContentType.
|
||||
type PostDomainsDomainNameRecordsJSONRequestBody = PostDomainsDomainNameRecordsJSONBody
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
@@ -16,13 +14,7 @@ import (
|
||||
|
||||
func TestLoadBalancerResource(t *testing.T) {
|
||||
// Must assign a password to the server or Binary Lane will send emails
|
||||
pw_bytes := make([]byte, 12)
|
||||
_, err := rand.Read(pw_bytes)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to generate password: %s", err)
|
||||
return
|
||||
}
|
||||
password := base64.URLEncoding.EncodeToString(pw_bytes)
|
||||
password := GenerateTestPassword(t)
|
||||
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
|
||||
|
||||
@@ -83,7 +83,7 @@ func (r *serverFirewallRulesResource) Create(ctx context.Context, req resource.C
|
||||
}
|
||||
|
||||
// Create API call logic
|
||||
firewallRules := []binarylane.AdvancedFirewallRule{}
|
||||
firewallRules := []binarylane.AdvancedFirewallRuleRequest{}
|
||||
diags := data.FirewallRules.ElementsAs(ctx, &firewallRules, true)
|
||||
resp.Diagnostics.Append(diags...)
|
||||
if resp.Diagnostics.HasError() {
|
||||
@@ -174,7 +174,7 @@ func (r *serverFirewallRulesResource) Update(ctx context.Context, req resource.U
|
||||
}
|
||||
|
||||
// Update API call logic
|
||||
firewallRules := []binarylane.AdvancedFirewallRule{}
|
||||
firewallRules := []binarylane.AdvancedFirewallRuleRequest{}
|
||||
diags := data.FirewallRules.ElementsAs(ctx, &firewallRules, true)
|
||||
resp.Diagnostics.Append(diags...)
|
||||
if resp.Diagnostics.HasError() {
|
||||
@@ -228,7 +228,7 @@ func (r *serverFirewallRulesResource) Delete(ctx context.Context, req resource.D
|
||||
data.ServerId.ValueInt64(),
|
||||
binarylane.PostServersServerIdActionsChangeAdvancedFirewallRulesJSONRequestBody{
|
||||
Type: "change_advanced_firewall_rules",
|
||||
FirewallRules: []binarylane.AdvancedFirewallRule{},
|
||||
FirewallRules: []binarylane.AdvancedFirewallRuleRequest{},
|
||||
})
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError(
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
|
||||
@@ -11,9 +9,7 @@ import (
|
||||
|
||||
func TestServerFirewallRulesResource(t *testing.T) {
|
||||
// Must assign a password to the server or Binary Lane will send emails
|
||||
pw_bytes := make([]byte, 12)
|
||||
rand.Read(pw_bytes)
|
||||
password := base64.URLEncoding.EncodeToString(pw_bytes)
|
||||
password := GenerateTestPassword(t)
|
||||
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
|
||||
|
||||
@@ -750,21 +750,14 @@ func (r *serverResource) Update(ctx context.Context, req resource.UpdateRequest,
|
||||
err.Error(),
|
||||
)
|
||||
return
|
||||
}
|
||||
if renameResp.StatusCode() != http.StatusOK {
|
||||
} else if renameResp.StatusCode() != http.StatusOK && renameResp.StatusCode() != http.StatusAccepted {
|
||||
resp.Diagnostics.AddError(
|
||||
"Unexpected HTTP status code renaming server",
|
||||
fmt.Sprintf("Received %s renaming server: server_id=%s. Details: %s", renameResp.Status(), state.Id.String(), renameResp.Body))
|
||||
return
|
||||
}
|
||||
if *renameResp.JSON200.Action.Status == "errored" {
|
||||
resp.Diagnostics.AddError(
|
||||
"Unexpected response with \"errored\" status when renaming server",
|
||||
fmt.Sprintf("Received %s renaming server: server_id=%s. Details: %s", renameResp.Status(), state.Id.String(), renameResp.Body))
|
||||
return
|
||||
}
|
||||
|
||||
// TODO - Currently, the API does not support polling for the rename to complete, because the action ID returns a 404 response (see #13)
|
||||
// TODO - Currently, the API does not support polling for the rename to complete, because there is no action ID in 202 accepted response (see #13)
|
||||
|
||||
state.Name = types.StringValue(plan.Name.ValueString())
|
||||
}
|
||||
|
||||
@@ -16,16 +16,11 @@ import (
|
||||
|
||||
func TestServerResource(t *testing.T) {
|
||||
// Must assign a password to the server or Binary Lane will send emails
|
||||
pwBytes := make([]byte, 12)
|
||||
rand.Read(pwBytes)
|
||||
password := base64.URLEncoding.EncodeToString(pwBytes)
|
||||
password1 := GenerateTestPassword(t)
|
||||
password2 := GenerateTestPassword(t)
|
||||
|
||||
pwBytes2 := make([]byte, 12)
|
||||
rand.Read(pwBytes2)
|
||||
password2 := base64.URLEncoding.EncodeToString(pwBytes2)
|
||||
|
||||
sshPublicKeyInitial := GeneratePublicKey(t)
|
||||
sshPublicKeyUpdated := GeneratePublicKey(t)
|
||||
sshPublicKeyInitial := GenerateTestPublicKey(t)
|
||||
sshPublicKeyUpdated := GenerateTestPublicKey(t)
|
||||
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
|
||||
@@ -57,7 +52,7 @@ resource "binarylane_server" "test" {
|
||||
image = "debian-11"
|
||||
size = "std-min"
|
||||
memory = 1152
|
||||
password = "` + password + `"
|
||||
password = "` + password1 + `"
|
||||
vpc_id = binarylane_vpc.test.id
|
||||
public_ipv4_count = 1
|
||||
ssh_keys = [binarylane_ssh_key.initial.id]
|
||||
@@ -87,7 +82,7 @@ data "binarylane_server" "test" {
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "disk", "20"),
|
||||
resource.TestCheckResourceAttrSet("binarylane_server.test", "vpc_id"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "public_ipv4_count", "1"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "password", password),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "password", password1),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "user_data", `#cloud-config
|
||||
echo "Hello World" > /var/tmp/output.txt
|
||||
`),
|
||||
@@ -178,7 +173,7 @@ resource "binarylane_server" "test" {
|
||||
image = "debian-12"
|
||||
size = "std-1vcpu"
|
||||
disk = "45"
|
||||
password = "` + password + `"
|
||||
password = "` + password1 + `"
|
||||
vpc_id = null
|
||||
public_ipv4_count = 0
|
||||
ssh_keys = [binarylane_ssh_key.updated.id]
|
||||
@@ -273,6 +268,61 @@ EOT
|
||||
})
|
||||
}
|
||||
|
||||
func TestServerResourceRename(t *testing.T) {
|
||||
// Must assign a password to the server or Binary Lane will send emails
|
||||
password := GenerateTestPassword(t)
|
||||
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Setup
|
||||
{
|
||||
Config: providerConfig + `
|
||||
|
||||
resource "binarylane_server" "test" {
|
||||
name = "tf-test-server-rename-1"
|
||||
region = "per"
|
||||
image = "debian-11"
|
||||
size = "std-min"
|
||||
public_ipv4_count = 0
|
||||
password = "` + password + `"
|
||||
}
|
||||
`,
|
||||
},
|
||||
// Rename
|
||||
{
|
||||
Config: providerConfig + `
|
||||
resource "binarylane_server" "test" {
|
||||
name = "tf-test-server-rename-2"
|
||||
region = "per"
|
||||
image = "debian-11"
|
||||
size = "std-min"
|
||||
public_ipv4_count = 0
|
||||
password = "` + password + `"
|
||||
}
|
||||
`,
|
||||
Check: resource.ComposeAggregateTestCheckFunc(
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "name", "tf-test-server-rename-2"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "region", "per"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "image", "debian-11"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "size", "std-min"),
|
||||
resource.TestCheckResourceAttr("binarylane_server.test", "password", password),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func GenerateTestPassword(t *testing.T) string {
|
||||
t.Helper()
|
||||
pwBytes := make([]byte, 12)
|
||||
_, err := rand.Read(pwBytes)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to generate password: %s", err)
|
||||
}
|
||||
return base64.URLEncoding.EncodeToString(pwBytes)
|
||||
}
|
||||
|
||||
func init() {
|
||||
resource.AddTestSweepers("server", &resource.Sweeper{
|
||||
Name: "server",
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSshKeyResource(t *testing.T) {
|
||||
publicKey := GeneratePublicKey(t)
|
||||
publicKey := GenerateTestPublicKey(t)
|
||||
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
|
||||
@@ -84,7 +84,7 @@ data "binarylane_ssh_key" "test" {
|
||||
})
|
||||
}
|
||||
|
||||
func GeneratePublicKey(t *testing.T) string {
|
||||
func GenerateTestPublicKey(t *testing.T) string {
|
||||
t.Helper()
|
||||
|
||||
pub, _, err := ed25519.GenerateKey(nil)
|
||||
|
||||
@@ -61,8 +61,8 @@ func LoadBalancerResourceSchema(ctx context.Context) schema.Schema {
|
||||
"protocol": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Leave null to accept the default HTTP protocol.",
|
||||
MarkdownDescription: "Leave null to accept the default HTTP protocol.",
|
||||
Description: "Leave null to accept the default HTTP protocol.\n\n| Value | Description |\n| ----- | ----------- |\n| http | The health check will be performed via HTTP. |\n| https | The health check will be performed via HTTPS. |\n| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |\n\n",
|
||||
MarkdownDescription: "Leave null to accept the default HTTP protocol.\n\n| Value | Description |\n| ----- | ----------- |\n| http | The health check will be performed via HTTP. |\n| https | The health check will be performed via HTTPS. |\n| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |\n\n",
|
||||
},
|
||||
},
|
||||
CustomType: HealthCheckType{
|
||||
|
||||
@@ -26,8 +26,8 @@ func ServerFirewallRulesResourceSchema(ctx context.Context) schema.Schema {
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"action": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "The action to take when there is a match on this rule.",
|
||||
MarkdownDescription: "The action to take when there is a match on this rule.",
|
||||
Description: "The action to take when there is a match on this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| drop | Traffic matching this rule will be dropped. |\n| accept | Traffic matching this rule will be accepted. |\n\n",
|
||||
MarkdownDescription: "The action to take when there is a match on this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| drop | Traffic matching this rule will be dropped. |\n| accept | Traffic matching this rule will be accepted. |\n\n",
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf(
|
||||
"drop",
|
||||
@@ -62,8 +62,8 @@ func ServerFirewallRulesResourceSchema(ctx context.Context) schema.Schema {
|
||||
},
|
||||
"protocol": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "The protocol to match for this rule.",
|
||||
MarkdownDescription: "The protocol to match for this rule.",
|
||||
Description: "The protocol to match for this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| all | This rule will match any protocol. |\n| icmp | This rule will match ICMP traffic only. |\n| tcp | This rule will match TCP traffic only. |\n| udp | This rule will match UDP traffic only. |\n\n",
|
||||
MarkdownDescription: "The protocol to match for this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| all | This rule will match any protocol. |\n| icmp | This rule will match ICMP traffic only. |\n| tcp | This rule will match TCP traffic only. |\n| udp | This rule will match UDP traffic only. |\n\n",
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf(
|
||||
"all",
|
||||
|
||||
+211
-31
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"openapi": "3.0.1",
|
||||
"openapi": "3.0.4",
|
||||
"info": {
|
||||
"title": "BinaryLane API",
|
||||
"description": "\n\n# Introduction\n\nThis API is used by BinaryLane's 'mPanel' website, so you'll find everything you need here to automate your use of BinaryLane or develop tools for others. You could even build your own version of 'mPanel' if you wanted!\n\n\n## Getting Started Guide\n\nWe are working on a complete 'Getting Started' guide as well as this introductory section.\n\n\n# Developer Preview Notes\n\n**Warning: this specification is currently in active development.** Until this warning is removed breaking changes are possible without the version changing.\nHowever, this API is relatively mature and we are actively developing a new website and other tools against this API so breaking changes should be rare at this point.\n\nWe currently have a CLI (command line interface) tool in development and are in the early stage of planning other tools.\n\nWe welcome all feedback from API users at the support email address above.\n\n\n## Active Development Status\n\nThis is the list of BinaryLane features that are not yet available through the API but are currently under active development.\nIf you need an ETA on when these will be available please contact support.\n\n- Domains\n\n\n## Future Development Status\n\nThis is the list of BinaryLane features that are not yet available through the API and are not currently in active development. This list is in a rough order of priority.\nIf you need an ETA or want to ask for increased priority on any of these please contact support, we are happy to hear any feedback on this.\n\n- Account Updates\n- Payments\n\n\n\n# API Tools\n\nThis section will include links to tools to assist with consuming this API. We have a CLI tool and a GO library in active development, and are planning libraries for other languages.\n\n\n# Version Information\n\nThis section will contain a link to our changelog once the developer preview period is complete.\n\n",
|
||||
@@ -8,7 +8,7 @@
|
||||
"url": "https://support.binarylane.com.au",
|
||||
"email": "support@binarylane.com.au"
|
||||
},
|
||||
"version": "0.29.0",
|
||||
"version": "0.32.0",
|
||||
"x-logo": {
|
||||
"url": "https://www.binarylane.com.au/res/images/binarylane/logo.png",
|
||||
"backgroundColor": "#000000",
|
||||
@@ -466,6 +466,19 @@
|
||||
],
|
||||
"summary": "Refresh Cached Nameserver Domain Records",
|
||||
"description": "The nameservers for domains are cached. If you have recently altered the nameservers for a managed domain you may need to refresh the cached domain records.",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DomainRefreshRequest"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
@@ -779,8 +792,7 @@
|
||||
{
|
||||
"$ref": "#/components/schemas/DomainRecordRequest"
|
||||
}
|
||||
],
|
||||
"description": "If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -901,10 +913,10 @@
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DomainRecordRequest"
|
||||
"$ref": "#/components/schemas/UpdateDomainRecordRequest"
|
||||
}
|
||||
],
|
||||
"description": "If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values."
|
||||
"description": "Any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5897,6 +5909,7 @@
|
||||
"schemas": {
|
||||
"Account": {
|
||||
"required": [
|
||||
"additional_ipv4_limit",
|
||||
"configured_payment_methods",
|
||||
"email",
|
||||
"email_verified",
|
||||
@@ -5947,6 +5960,12 @@
|
||||
},
|
||||
"description": "The payment methods that are configured (available) for this account.",
|
||||
"readOnly": true
|
||||
},
|
||||
"additional_ipv4_limit": {
|
||||
"type": "integer",
|
||||
"description": "The maximum additional IPv4 addresses this account may assign across all servers. You may contact support to request this limit be increased.",
|
||||
"format": "int32",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6036,7 +6055,7 @@
|
||||
"$ref": "#/components/schemas/ResourceType"
|
||||
}
|
||||
],
|
||||
"description": "The resource type (if any) associated with this action.",
|
||||
"description": "The resource type (if any) associated with this action.\n\n| Value | Description |\n| ----- | ----------- |\n| server | Server |\n| load-balancer | Load Balancer |\n| ssh-key | SSH Key |\n| vpc | Virtual Private Network |\n| image | Backup or Operating System Image |\n| registered-domain-name | Registered Domain Name |\n\n",
|
||||
"nullable": true,
|
||||
"readOnly": true
|
||||
},
|
||||
@@ -6291,7 +6310,6 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source_addresses": {
|
||||
"minItems": 1,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
@@ -6303,7 +6321,6 @@
|
||||
}
|
||||
},
|
||||
"destination_addresses": {
|
||||
"minItems": 1,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
@@ -6332,7 +6349,7 @@
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRuleProtocol"
|
||||
}
|
||||
],
|
||||
"description": "The protocol to match for this rule.",
|
||||
"description": "The protocol to match for this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| all | This rule will match any protocol. |\n| icmp | This rule will match ICMP traffic only. |\n| tcp | This rule will match TCP traffic only. |\n| udp | This rule will match UDP traffic only. |\n\n",
|
||||
"x-cli-format": 3,
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "protocol"
|
||||
@@ -6344,15 +6361,13 @@
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRuleAction"
|
||||
}
|
||||
],
|
||||
"description": "The action to take when there is a match on this rule.",
|
||||
"description": "The action to take when there is a match on this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| drop | Traffic matching this rule will be dropped. |\n| accept | Traffic matching this rule will be accepted. |\n\n",
|
||||
"x-cli-format": 5,
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "action"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"maxLength": 250,
|
||||
"minLength": 0,
|
||||
"type": "string",
|
||||
"description": "A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. \"Block access to RDP\" or \"Allow access from HQ\".",
|
||||
"nullable": true,
|
||||
@@ -6391,6 +6406,82 @@
|
||||
"This rule will match UDP traffic only."
|
||||
]
|
||||
},
|
||||
"AdvancedFirewallRuleRequest": {
|
||||
"required": [
|
||||
"action",
|
||||
"destination_addresses",
|
||||
"protocol",
|
||||
"source_addresses"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source_addresses": {
|
||||
"minItems": 1,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.",
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "source_addresses"
|
||||
}
|
||||
},
|
||||
"destination_addresses": {
|
||||
"minItems": 1,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The destination addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.",
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "destination_addresses"
|
||||
}
|
||||
},
|
||||
"destination_ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The destination ports to match for this rule. Leave null or empty to match on all ports.",
|
||||
"nullable": true,
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "destination_ports"
|
||||
}
|
||||
},
|
||||
"protocol": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRuleProtocol"
|
||||
}
|
||||
],
|
||||
"description": "The protocol to match for this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| all | This rule will match any protocol. |\n| icmp | This rule will match ICMP traffic only. |\n| tcp | This rule will match TCP traffic only. |\n| udp | This rule will match UDP traffic only. |\n\n",
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "protocol"
|
||||
}
|
||||
},
|
||||
"action": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRuleAction"
|
||||
}
|
||||
],
|
||||
"description": "The action to take when there is a match on this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| drop | Traffic matching this rule will be dropped. |\n| accept | Traffic matching this rule will be accepted. |\n\n",
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "action"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"maxLength": 250,
|
||||
"minLength": 0,
|
||||
"type": "string",
|
||||
"description": "A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. \"Block access to RDP\" or \"Allow access from HQ\".",
|
||||
"nullable": true,
|
||||
"x-oapi-codegen-extra-tags": {
|
||||
"tfsdk": "description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"AdvancedFirewallRulesResponse": {
|
||||
"required": [
|
||||
"firewall_rules"
|
||||
@@ -6426,7 +6517,7 @@
|
||||
"$ref": "#/components/schemas/VmMachineType"
|
||||
}
|
||||
],
|
||||
"description": "The machine_type (corresponding to a KVM version) used for this server.\nA null value indicates automatic selection of the best KVM machine type supported by the host node.",
|
||||
"description": "The machine_type (corresponding to a KVM version) used for this server.\nA null value indicates automatic selection of the best KVM machine type supported by the host node.\n\n| Value | Description |\n| ----- | ----------- |\n| pc_i440fx_1point5 | PC i440FX 1.5 |\n| pc_i440fx_2point11 | PC i440FX 2.11 |\n| pc_i440fx_4point1 | PC i440FX 4.1 |\n| pc_i440fx_4point2 | PC i440FX 4.2 |\n| pc_i440fx_5point0 | PC i440FX 5.0 |\n| pc_i440fx_5point1 | PC i440FX 5.1 |\n| pc_i440fx_7point2 | PC i440FX 7.2 |\n| pc_i440fx_8point2 | PC i440FX 8.2 |\n\n",
|
||||
"nullable": true,
|
||||
"readOnly": true
|
||||
},
|
||||
@@ -6856,7 +6947,7 @@
|
||||
"$ref": "#/components/schemas/VmMachineType"
|
||||
}
|
||||
],
|
||||
"description": "Do not provide or set to null to keep existing machine type.",
|
||||
"description": "Do not provide or set to null to keep existing machine type.\n\n| Value | Description |\n| ----- | ----------- |\n| pc_i440fx_1point5 | PC i440FX 1.5 |\n| pc_i440fx_2point11 | PC i440FX 2.11 |\n| pc_i440fx_4point1 | PC i440FX 4.1 |\n| pc_i440fx_4point2 | PC i440FX 4.2 |\n| pc_i440fx_5point0 | PC i440FX 5.0 |\n| pc_i440fx_5point1 | PC i440FX 5.1 |\n| pc_i440fx_7point2 | PC i440FX 7.2 |\n| pc_i440fx_8point2 | PC i440FX 8.2 |\n\n",
|
||||
"nullable": true
|
||||
},
|
||||
"automatic_machine_type": {
|
||||
@@ -6870,7 +6961,7 @@
|
||||
"$ref": "#/components/schemas/VideoDevice"
|
||||
}
|
||||
],
|
||||
"description": "Do not provide or set to null to keep existing video device.",
|
||||
"description": "Do not provide or set to null to keep existing video device.\n\n| Value | Description |\n| ----- | ----------- |\n| cirrus-logic | Cirrus Logic GD5446 |\n| standard | Standard VGA with VESA 2.0 extensions |\n| virtio | Virtio VGA (800x600) |\n| virtio-wide | Virtio VGA (1600x900) |\n\n",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
@@ -6893,7 +6984,7 @@
|
||||
"firewall_rules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRule"
|
||||
"$ref": "#/components/schemas/AdvancedFirewallRuleRequest"
|
||||
},
|
||||
"description": "A list of rules for the server. NB: that any existing rules that are not included will be removed. Submit an empty list to clear all rules."
|
||||
}
|
||||
@@ -8172,6 +8263,11 @@
|
||||
}
|
||||
},
|
||||
"DomainRecordRequest": {
|
||||
"required": [
|
||||
"data",
|
||||
"name",
|
||||
"type"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
@@ -8180,18 +8276,17 @@
|
||||
"$ref": "#/components/schemas/DomainRecordType"
|
||||
}
|
||||
],
|
||||
"description": "The type of the DNS record.",
|
||||
"nullable": true
|
||||
"description": "The type of the DNS record.\n\n| Value | Description |\n| ----- | ----------- |\n| A | Map an IPv4 address to a hostname. |\n| AAAA | Map an IPv6 address to a hostname. |\n| CAA | Restrict which certificate authorities are permitted to issue certificates for a domain. |\n| CNAME | Define an alias for your canonical hostname. |\n| MX | Define the mail exchanges that handle mail for the domain. |\n| NS | Define the nameservers that manage the domain. |\n| SOA | The Start of Authority record for the zone. |\n| SRV | Specify a server by hostname and port to handle a service or services. |\n| TXT | Define a string of text that is associated with a hostname. |\n\n"
|
||||
},
|
||||
"name": {
|
||||
"minLength": 1,
|
||||
"type": "string",
|
||||
"description": "The subdomain for this record. Use @ for records on the domain itself, and * to create a wildcard record.",
|
||||
"nullable": true
|
||||
"description": "The subdomain for this record. Use @ for records on the domain itself, and * to create a wildcard record."
|
||||
},
|
||||
"data": {
|
||||
"minLength": 1,
|
||||
"type": "string",
|
||||
"description": "A general data field that has different functions depending on the record type.",
|
||||
"nullable": true
|
||||
"description": "A general data field that has different functions depending on the record type."
|
||||
},
|
||||
"priority": {
|
||||
"maximum": 65535,
|
||||
@@ -8239,8 +8334,7 @@
|
||||
"description": "A parameter tag that is only relevant for CAA records.",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"description": "If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values."
|
||||
}
|
||||
},
|
||||
"DomainRecordResponse": {
|
||||
"required": [
|
||||
@@ -8316,6 +8410,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DomainRefreshRequest": {
|
||||
"required": [
|
||||
"domain_names"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain_names": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The domain names to refresh."
|
||||
}
|
||||
}
|
||||
},
|
||||
"DomainRequest": {
|
||||
"required": [
|
||||
"name"
|
||||
@@ -8457,7 +8566,7 @@
|
||||
"$ref": "#/components/schemas/HealthCheckProtocol"
|
||||
}
|
||||
],
|
||||
"description": "Leave null to accept the default HTTP protocol.",
|
||||
"description": "Leave null to accept the default HTTP protocol.\n\n| Value | Description |\n| ----- | ----------- |\n| http | The health check will be performed via HTTP. |\n| https | The health check will be performed via HTTPS. |\n| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |\n\n",
|
||||
"nullable": true
|
||||
},
|
||||
"path": {
|
||||
@@ -8828,7 +8937,7 @@
|
||||
},
|
||||
"locked": {
|
||||
"type": "boolean",
|
||||
"description": "Optional: you may choose to lock an individual backup in which case we will not update that backup until you unlock it. Do not provide to leave the locked status unchanged.",
|
||||
"description": "Optional: you may choose to lock an individual backup in which case we will not update that backup until you unlock it. Do not provide to leave the locked status unchanged. You may not lock or unlock a temporary backup or a backup that is attached to a server.",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
@@ -11884,7 +11993,7 @@
|
||||
"$ref": "#/components/schemas/BackupSlot"
|
||||
}
|
||||
],
|
||||
"description": "If replacement_strategy is anything other than 'specified', this must be provided.",
|
||||
"description": "If replacement_strategy is anything other than 'specified', this must be provided.\n\n| Value | Description |\n| ----- | ----------- |\n| daily | A backup which is scheduled to be taken each day. |\n| weekly | A backup which is scheduled to be taken each week. |\n| monthly | A backup which is scheduled to be taken each month. |\n| temporary | A backup which is created on demand and only retained for a maximum of seven days. |\n\n",
|
||||
"nullable": true
|
||||
},
|
||||
"replacement_strategy": {
|
||||
@@ -11893,7 +12002,7 @@
|
||||
"$ref": "#/components/schemas/BackupReplacementStrategy"
|
||||
}
|
||||
],
|
||||
"description": "The strategy for selecting which backup to replace (if any)."
|
||||
"description": "The strategy for selecting which backup to replace (if any).\n\n| Value | Description |\n| ----- | ----------- |\n| none | Do not replace any existing backup: use a free slot of the provided backup type. If there are no free slots an error will occur. |\n| specified | Replace the specific backup id provided. |\n| oldest | Use any free slots of the provided backup type, and if there are no free slots replace the oldest unlocked and un-attached backup of the provided backup type. |\n| newest | Use any free slots of the provided backup type, and if there are no free slots replace the newest unlocked and un-attached backup of the provided backup type. |\n\n"
|
||||
},
|
||||
"backup_id_to_replace": {
|
||||
"type": "integer",
|
||||
@@ -12096,6 +12205,77 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpdateDomainRecordRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DomainRecordType"
|
||||
}
|
||||
],
|
||||
"description": "The type of the DNS record.\n\n| Value | Description |\n| ----- | ----------- |\n| A | Map an IPv4 address to a hostname. |\n| AAAA | Map an IPv6 address to a hostname. |\n| CAA | Restrict which certificate authorities are permitted to issue certificates for a domain. |\n| CNAME | Define an alias for your canonical hostname. |\n| MX | Define the mail exchanges that handle mail for the domain. |\n| NS | Define the nameservers that manage the domain. |\n| SOA | The Start of Authority record for the zone. |\n| SRV | Specify a server by hostname and port to handle a service or services. |\n| TXT | Define a string of text that is associated with a hostname. |\n\n",
|
||||
"nullable": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The subdomain for this record. Use @ for records on the domain itself, and * to create a wildcard record.",
|
||||
"nullable": true
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
"description": "A general data field that has different functions depending on the record type.",
|
||||
"nullable": true
|
||||
},
|
||||
"priority": {
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"description": "A priority value that is only relevant for SRV and MX records.",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"port": {
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"description": "A port value that is only relevant for SRV records.",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"ttl": {
|
||||
"type": "integer",
|
||||
"description": "This value is the time to live for the record, in seconds.",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"weight": {
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"description": "The weight value that is only relevant for SRV records.",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"flags": {
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"description": "An unsigned integer between 0-255 that is only relevant for CAA records.",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"tag": {
|
||||
"maxLength": 15,
|
||||
"minLength": 1,
|
||||
"pattern": "[a-z0-9]+",
|
||||
"type": "string",
|
||||
"description": "A parameter tag that is only relevant for CAA records.",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"description": "Any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values."
|
||||
},
|
||||
"UpdateLoadBalancerRequest": {
|
||||
"required": [
|
||||
"name"
|
||||
@@ -12214,7 +12394,7 @@
|
||||
"$ref": "#/components/schemas/BackupSlot"
|
||||
}
|
||||
],
|
||||
"description": "If replacement_strategy is anything other than 'specified', this must be provided.",
|
||||
"description": "If replacement_strategy is anything other than 'specified', this must be provided.\n\n| Value | Description |\n| ----- | ----------- |\n| daily | A backup which is scheduled to be taken each day. |\n| weekly | A backup which is scheduled to be taken each week. |\n| monthly | A backup which is scheduled to be taken each month. |\n| temporary | A backup which is created on demand and only retained for a maximum of seven days. |\n\n",
|
||||
"nullable": true
|
||||
},
|
||||
"replacement_strategy": {
|
||||
@@ -12223,7 +12403,7 @@
|
||||
"$ref": "#/components/schemas/BackupReplacementStrategy"
|
||||
}
|
||||
],
|
||||
"description": "The strategy for selecting which backup to replace (if any)."
|
||||
"description": "The strategy for selecting which backup to replace (if any).\n\n| Value | Description |\n| ----- | ----------- |\n| none | Do not replace any existing backup: use a free slot of the provided backup type. If there are no free slots an error will occur. |\n| specified | Replace the specific backup id provided. |\n| oldest | Use any free slots of the provided backup type, and if there are no free slots replace the oldest unlocked and un-attached backup of the provided backup type. |\n| newest | Use any free slots of the provided backup type, and if there are no free slots replace the newest unlocked and un-attached backup of the provided backup type. |\n\n"
|
||||
},
|
||||
"backup_id_to_replace": {
|
||||
"type": "integer",
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
"name": "protocol",
|
||||
"string": {
|
||||
"computed_optional_required": "computed_optional",
|
||||
"description": "Leave null to accept the default HTTP protocol."
|
||||
"description": "Leave null to accept the default HTTP protocol.\n\n| Value | Description |\n| ----- | ----------- |\n| http | The health check will be performed via HTTP. |\n| https | The health check will be performed via HTTPS. |\n| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that protocol. |\n\n"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1024,7 +1024,7 @@
|
||||
"name": "action",
|
||||
"string": {
|
||||
"computed_optional_required": "required",
|
||||
"description": "The action to take when there is a match on this rule.",
|
||||
"description": "The action to take when there is a match on this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| drop | Traffic matching this rule will be dropped. |\n| accept | Traffic matching this rule will be accepted. |\n\n",
|
||||
"validators": [
|
||||
{
|
||||
"custom": {
|
||||
@@ -1094,7 +1094,7 @@
|
||||
"name": "protocol",
|
||||
"string": {
|
||||
"computed_optional_required": "required",
|
||||
"description": "The protocol to match for this rule.",
|
||||
"description": "The protocol to match for this rule.\n\n| Value | Description |\n| ----- | ----------- |\n| all | This rule will match any protocol. |\n| icmp | This rule will match ICMP traffic only. |\n| tcp | This rule will match TCP traffic only. |\n| udp | This rule will match UDP traffic only. |\n\n",
|
||||
"validators": [
|
||||
{
|
||||
"custom": {
|
||||
|
||||
@@ -49,6 +49,12 @@ cat <<<$(jq '.components.schemas.AdvancedFirewallRule.properties.action += {"x-o
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRule.properties.destination_addresses += {"x-oapi-codegen-extra-tags": {"tfsdk": "destination_addresses"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRule.properties.destination_ports += {"x-oapi-codegen-extra-tags": {"tfsdk": "destination_ports"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRule.properties.source_addresses += {"x-oapi-codegen-extra-tags": {"tfsdk": "source_addresses"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.description += {"x-oapi-codegen-extra-tags": {"tfsdk": "description"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.protocol += {"x-oapi-codegen-extra-tags": {"tfsdk": "protocol"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.action += {"x-oapi-codegen-extra-tags": {"tfsdk": "action"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.destination_addresses += {"x-oapi-codegen-extra-tags": {"tfsdk": "destination_addresses"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.destination_ports += {"x-oapi-codegen-extra-tags": {"tfsdk": "destination_ports"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
cat <<<$(jq '.components.schemas.AdvancedFirewallRuleRequest.properties.source_addresses += {"x-oapi-codegen-extra-tags": {"tfsdk": "source_addresses"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
|
||||
## Load Balancer
|
||||
cat <<<$(jq '.components.schemas.CreateLoadBalancerRequest.properties.forwarding_rules += {"x-oapi-codegen-extra-tags": {"tfsdk": "forwarding_rules"}}' $OPENAPI_FILE) >$OPENAPI_FILE
|
||||
|
||||
Reference in New Issue
Block a user