Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requested history retention seconds exceeds allowed maximum #140

Open
mpereira opened this issue Jan 21, 2025 · 3 comments
Open

Requested history retention seconds exceeds allowed maximum #140

mpereira opened this issue Jan 21, 2025 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@mpereira
Copy link

I'm seeing the same issue as was reported in #104.

I created a Neon account today, created an API key, and have this Terraform manifest:

terraform {
  required_version = "1.4"

  required_providers {
    neon = {
      source = "kislerdm/neon"
      version = "0.6.3"
    }
  }
}

variable "neon_api_token" {}

provider "neon" {
  api_key = var.neon_api_token
}

resource "neon_project" "test" {
  name = "test"
}

Error:

│ Error: [HTTP Code: 400][Error Code: ] requested history retention seconds exceeds allowed maximum; requested_history_retention_seconds:"604800", max:"86400"
│ 
│   with neon_project.marketminer,
│   on main.tf line 805, in resource "neon_project" "test":
│  805: resource "neon_project" "test" {
│ 
╵
2025-01-21T17:00:54.064+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-21T17:00:54.066+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/kislerdm/neon/0.6.3/darwin_arm64/terraform-provider-neon_v0.6.3 pid=51186
2025-01-21T17:00:54.066+0100 [DEBUG] provider: plugin exited

Output with TF_LOG=debug:

2025-01-21T17:00:41.876+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/kislerdm/neon/0.6.3/darwin_arm64/terraform-provider-neon_v0.6.3 args=[.terraform/providers/registry.terraform.io/kislerdm/neon/0.6.3/darwin_arm64/terraform-provider-neon_v0.6.3]
2025-01-21T17:00:41.878+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/kislerdm/neon/0.6.3/darwin_arm64/terraform-provider-neon_v0.6.3 pid=51186
2025-01-21T17:00:41.878+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/kislerdm/neon/0.6.3/darwin_arm64/terraform-provider-neon_v0.6.3
2025-01-21T17:00:41.909+0100 [INFO]  provider.terraform-provider-neon_v0.6.3: configuring server automatic mTLS: timestamp=2025-01-21T17:00:41.907+0100
2025-01-21T17:00:41.915+0100 [DEBUG] provider.terraform-provider-neon_v0.6.3: plugin address: address=/var/folders/nn/120cjkpx75b8z_jcvjm04_940000gn/T/plugin1930662658 network=unix timestamp=2025-01-21T17:00:41.915+0100
2025-01-21T17:00:42.025+0100 [INFO]  provider.terraform-provider-neon_v0.6.3: 2025/01/21 17:00:42 [DEBUG] setting computed for "quota" from ComputedKeys: timestamp=2025-01-21T17:00:42.025+0100
2025-01-21T17:00:42.025+0100 [INFO]  provider.terraform-provider-neon_v0.6.3: 2025/01/21 17:00:42 [DEBUG] setting computed for "default_endpoint_settings" from ComputedKeys: timestamp=2025-01-21T17:00:42.025+0100
2025-01-21T17:00:42.076+0100 [INFO]  provider.terraform-provider-neon_v0.6.3: 2025/01/21 17:00:42 [DEBUG] setting computed for "branch" from ComputedKeys: timestamp=2025-01-21T17:00:42.025+0100
2025-01-21T17:00:42.076+0100 [DEBUG] provider.terraform-provider-neon_v0.6.3: API call attempt 0: tf_provider_addr=registry.terraform.io/kislerdm/neon tf_req_id=133d920e-4041-ad94-5259-7735577e1de4 tf_resource_type=neon_project @caller=github.com/kislerdm/terraform-provider-neon/internal/provider/provider.go:29 @module=neon tf_rpc=ApplyResourceChange timestamp=2025-01-21T17:00:42.025+0100
2025-01-21T17:00:42.688+0100 [DEBUG] provider.terraform-provider-neon_v0.6.3: API call error code: 400: @module=neon tf_req_id=133d920e-4041-ad94-5259-7735577e1de4 @caller=github.com/kislerdm/terraform-provider-neon/internal/provider/provider.go:35 tf_provider_addr=registry.terraform.io/kislerdm/neon tf_resource_type=neon_project tf_rpc=ApplyResourceChange timestamp=2025-01-21T17:00:42.688+0100
2025-01-21T17:00:42.691+0100 [ERROR] provider.terraform-provider-neon_v0.6.3: Response contains error diagnostic: @module=sdk.proto diagnostic_detail= tf_provider_addr=registry.terraform.io/kislerdm/neon tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 tf_req_id=133d920e-4041-ad94-5259-7735577e1de4 tf_resource_type=neon_project diagnostic_severity=ERROR diagnostic_summary="[HTTP Code: 400][Error Code: ] requested history retention seconds exceeds allowed maximum; requested_history_retention_seconds:"604800", max:"86400"" tf_proto_version=5.4 timestamp=2025-01-21T17:00:42.689+0100
@bobbyiliev
Copy link

When creating your project try setting the history_retention_seconds to 86400

Just tested this and it seems to be working:

resource "neon_project" "test" {
  name = "test"
  history_retention_seconds = 86400
}

@bobbyiliev
Copy link

This has already been fixed but not yet released: v0.6.3...master

@mpereira
Copy link
Author

When creating your project try setting the history_retention_seconds to 86400

That works, thanks @bobbyiliev!

@kislerdm kislerdm added the duplicate This issue or pull request already exists label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants