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

Terraform does not realise when logging_pipeline is ready #584

Closed
salyh opened this issue Jun 19, 2024 · 9 comments
Closed

Terraform does not realise when logging_pipeline is ready #584

salyh opened this issue Jun 19, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@salyh
Copy link

salyh commented Jun 19, 2024

Description

I try to create a logging pipeline via terraform.

resource "ionoscloud_logging_pipeline" "xxx" {
  name = "xxx"
  log {
    source   = "kubernetes"
    tag      = "kubernetes"
    protocol = "tcp"
    destinations {
      type              = "loki"
      retention_in_days = 30
    }
  }
}

After 8 minutes its still creating:

ionoscloud_logging_pipeline.xxx: Still creating... [8m1s elapsed]

but when I query the status via ionosctl the logging pipeline appears ready (see screenshot)

Expected behavior

Terraform realise when logging pipeline is ready and continues to create other resources or exists with status code 0

Environment

Terraform version:

OpenTofu v1.7.2

Provider version:

v6.4.17

OS:

Monosnap ~ 2024-06-19 13-13-38
$ ionosctl logging-service pipeline list
Id                                     Name         GrafanaAddress                                  CreatedDate
8f7xxxxx   XXX   grafana.xxxxxx.logging.xxxxx.ionos.com   2024-06-19T11:06:57Z
@salyh salyh added the bug Something isn't working label Jun 19, 2024
@salyh
Copy link
Author

salyh commented Jun 19, 2024

Looks like the "state": attribute is missing in the returned json?

According to the API (https://api.ionos.com/docs/logging/v1/#tag/Pipelines/operation/pipelinesFindById) there should be such a state field.

Monosnap IONOS Logging REST API 2024-06-19 13-46-40

@salyh
Copy link
Author

salyh commented Jun 19, 2024

Internal ticket ref 207171757

@salyh
Copy link
Author

salyh commented Jun 22, 2024

Monosnap meod-control-plane – logging tf  meod-control-plane  2024-06-22 12-59-45

@salyh
Copy link
Author

salyh commented Jun 22, 2024

https://github.com/ionos-cloud/sdk-go-logging/blob/4256f7f1ec700e40781f99943f0b3c280293a4fa/model_metadata.go#L31

For me it looks like it should be json:"status,omitempty" instead of json:"state,omitempty" to match "status": "AVAILABLE"

@adeatcu-ionos
Copy link
Contributor

Hello! I will investigate this. Is it a long time between you noticing that the pipeline is AVAILABLE vs Terraform notifying you that the creation was successful? Maybe there is a small difference because of the ways in which the refresh calls are done in this function that basically handles the wait for resource to become "AVAILABLE" logic.

@salyh
Copy link
Author

salyh commented Jun 27, 2024

Hello! I will investigate this. Is it a long time between you noticing that the pipeline is AVAILABLE vs Terraform notifying you that the creation was successful?

Terraform never notifies me that the creation was successful!

Maybe there is a small difference because of the ways in which the refresh calls are done in this function that basically handles the wait for resource to become "AVAILABLE" logic.

I think its a bug like descibed here ionos-cloud/sdk-go-logging#3 (comment)

@adeatcu-ionos
Copy link
Contributor

@salyh thank you for the clarification, I will take a look.

@cristiGuranIonos
Copy link
Collaborator

Hi, we have an issue opened with the logging team. Will be fixed asap.

@cristiGuranIonos
Copy link
Collaborator

Fixed, should work now. It was the state/status field, thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants