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

selectel_dbaas_prometheus_metric_token_v1 doesn't return token value #321

Open
legioner0 opened this issue Dec 24, 2024 · 0 comments
Open

Comments

@legioner0
Copy link

legioner0 commented Dec 24, 2024

I've tried to create selectel_dbaas_prometheus_metric_token_v1. It's created successfully - it visible in database monitoring section in dashboard with correct name and value. But selectel_dbaas_prometheus_metric_token_v1.prometheus_token.value contains empty value. Also each subsequent execute of terraform apply try update token name.

Terraform Version

Terraform v1.10.1

Terraform Provider Selectel Version

6.0.1

Affected Resource(s)

  • selectel_dbaas_prometheus_metric_token_v1

Terraform Configuration Files

resource "selectel_dbaas_prometheus_metric_token_v1" "prometheus_token" {
  project_id = "<sensitive value>"
  region     = "ru-3"
  name       = "test_token"
}

output "prometheus_token" {
  value       = selectel_dbaas_prometheus_metric_token_v1.prometheus_token.value
}

Expected Behavior

  1. selectel_dbaas_prometheus_metric_token_v1.prometheus_token.value return created token value
  2. token name not updated on each terraform apply

Actual Behavior

  1. selectel_dbaas_prometheus_metric_token_v1.prometheus_token.value returns empty value
  2. token name updated on each terraform apply

Debug output

On first terraform apply

...
selectel_dbaas_prometheus_metric_token_v1.prometheus_token: Creating...
2024-12-24T16:33:51.951+0700 [INFO]  Starting apply for selectel_dbaas_prometheus_metric_token_v1.prometheus_token
2024-12-24T16:33:51.951+0700 [DEBUG] selectel_dbaas_prometheus_metric_token_v1.prometheus_token: applying the planned Create change
2024-12-24T16:33:53.073+0700 [INFO]  provider.terraform-provider-selectel_v6.0.1: 2024/12/24 16:33:53 [DEBUG] Creating prometheus-metric-token with options: {Name:test_token}: timestamp="2024-12-24T16:33:53.073+0700"
2024-12-24T16:33:53.537+0700 [INFO]  provider.terraform-provider-selectel_v6.0.1: 2024/12/24 16:33:53 [DEBUG] Getting prometheus-metric-token '<sensitive value>': timestamp="2024-12-24T16:33:53.537+0700"
2024-12-24T16:33:53.691+0700 [WARN]  Provider "provider[\"registry.terraform.io/selectel/selectel\"]" produced an unexpected new value for selectel_dbaas_prometheus_metric_token_v1.prometheus_token, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .name: was cty.StringVal("test_token"), but now cty.StringVal("")
selectel_dbaas_prometheus_metric_token_v1.prometheus_token: Creation complete after 2s [id=<sensitive value>]
...

Steps to Reproduce

  1. terraform apply - token created, but returns empty value
  2. terraform apply - token try to update token name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant