Skip to content

Commit

Permalink
fix: remove two Thanos connection info fiels (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
rriski authored Oct 9, 2024
1 parent 2886b4d commit 23f19dc
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nav_order: 1
## [MAJOR.MINOR.PATCH] - YYYY-MM-DD

- Remove `aiven_thanos` from beta resources
- Removes `receiver_ingesting_remote_write_uri` and `store_uri` Thanos connection info fields
- Adds `stringtype` to `flink_external_postgresql_user_config` service integration
- Fix `terraform import` for services with additional disk space or read replica service integration

Expand Down
2 changes: 0 additions & 2 deletions docs/data-sources/thanos.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ Read-Only:

- `query_frontend_uri` (String)
- `query_uri` (String)
- `receiver_ingesting_remote_write_uri` (String)
- `receiver_remote_write_uri` (String)
- `store_uri` (String)
- `uris` (List of String)


Expand Down
2 changes: 0 additions & 2 deletions docs/resources/thanos.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ Read-Only:

- `query_frontend_uri` (String, Sensitive) Query frontend URI.
- `query_uri` (String, Sensitive) Query URI.
- `receiver_ingesting_remote_write_uri` (String, Sensitive) Receiver ingesting remote write URI.
- `receiver_remote_write_uri` (String, Sensitive) Receiver remote write URI.
- `store_uri` (String, Sensitive, Deprecated) Store URI.


<a id="nestedblock--thanos_user_config"></a>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23

require (
github.com/aiven/aiven-go-client/v2 v2.27.0
github.com/aiven/go-client-codegen v0.38.0
github.com/aiven/go-client-codegen v0.39.0
github.com/avast/retry-go v3.0.0+incompatible
github.com/dave/jennifer v1.7.1
github.com/docker/go-units v0.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ github.com/aiven/go-api-schemas v1.91.0 h1:jiJpRwFKf3IcuZtMIzDmNyICmX0ayqDYMh9QF
github.com/aiven/go-api-schemas v1.91.0/go.mod h1:qS3E/3R+aKQbHsqXzNHqlXATY1kbVNzhiJvk2IDmADI=
github.com/aiven/go-client-codegen v0.38.0 h1:WnH9CEtVbolqqKr9PlIZZE9pG4lWkNK+H6iyHO/b010=
github.com/aiven/go-client-codegen v0.38.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA=
github.com/aiven/go-client-codegen v0.39.0 h1:jyyMd0LJyPUFb1Z7MS39uGbO4GZE2ZpxP1H2xsNbuaE=
github.com/aiven/go-client-codegen v0.39.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
Expand Down
1 change: 0 additions & 1 deletion internal/schemautil/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,6 @@ func copyConnectionInfoFromAPIResponseToTerraform(
props["uris"] = connectionInfo.Thanos
setProp(props, "query_frontend_uri", connectionInfo.QueryFrontendUri)
setProp(props, "query_uri", connectionInfo.QueryUri)
setProp(props, "receiver_ingesting_remote_write_uri", connectionInfo.ReceiverIngestingRemoteWriteUri)
setProp(props, "receiver_remote_write_uri", connectionInfo.ReceiverRemoteWriteUri)
case ServiceTypeMySQL:
props["uris"] = connectionInfo.Mysql
Expand Down
13 changes: 0 additions & 13 deletions internal/sdkprovider/service/thanos/thanos.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,12 @@ func thanosSchema() map[string]*schema.Schema {
Description: "Query URI.",
Sensitive: true,
},
"receiver_ingesting_remote_write_uri": {
Type: schema.TypeString,
Computed: true,
Description: "Receiver ingesting remote write URI.",
Sensitive: true,
},
"receiver_remote_write_uri": {
Type: schema.TypeString,
Computed: true,
Description: "Receiver remote write URI.",
Sensitive: true,
},
"store_uri": {
Type: schema.TypeString,
Computed: true,
Description: "Store URI.",
Sensitive: true,
Deprecated: "This field was added by mistake and has never worked. It will be removed in future versions.",
},
},
},
}
Expand Down
8 changes: 0 additions & 8 deletions internal/sdkprovider/service/thanos/thanos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ func testAccCheckAivenServiceThanosAttributes(n string) resource.TestCheckFunc {
return fmt.Errorf("expected to get a correct public_access.query from Aiven")
}

if a["thanos_user_config.0.public_access.0.store"] != "false" {
return fmt.Errorf("expected to get a correct public_access.store from Aiven")
}

if a["thanos.0.uris.#"] == "" {
return fmt.Errorf("expected to get correct uris from Aiven")
}
Expand All @@ -316,10 +312,6 @@ func testAccCheckAivenServiceThanosAttributes(n string) resource.TestCheckFunc {
return fmt.Errorf("expected to get correct query_uri from Aiven")
}

if a["thanos.0.receiver_ingesting_remote_write_uri"] == "" {
return fmt.Errorf("expected to get correct receiver_ingesting_remote_write_uri from Aiven")
}

if a["thanos.0.receiver_remote_write_uri"] == "" {
return fmt.Errorf("expected to get correct receiver_remote_write_uri from Aiven")
}
Expand Down

0 comments on commit 23f19dc

Please sign in to comment.