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

google_cloud_tasks_queue diff on retry_config.max_retry_duration #8028

Assignees
Labels
bug forward/review In review; remove label to forward service/cloudtasks

Comments

@omelnyk1
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.12.26
Providers:

  • "google-beta" (hashicorp/google-beta) 3.51.0
  • "google" (hashicorp/google) 3.51.0

Affected Resource(s)

  • google_cloud_tasks_queue

Terraform Configuration Files

provider "google" {
  version = "3.51.0"
  project = "everon-test"
  region  = "europe-west1"
}

provider "google-beta" {
  version = "3.51.0"
  project = "everon-test"
  region  = "europe-west1"
}

resource "google_cloud_tasks_queue" "this" {
  name     = "demo"
  location = "europe-west1"

  retry_config {
    max_attempts       = -1
    max_retry_duration = "0s"
  }
}

Debug Output

First attempt terraform apply: https://gist.github.com/omelnyk1/dc790f708c40804f7769f0b1874a620f
Second and all next attempts: https://gist.github.com/omelnyk1/50b5b2f4e7aa4229efab5e7ab3a9243f

Panic Output

Expected Behavior

Terraform shouldn't try to change resource.

Actual Behavior

All the time terraform wants to update max_retry_duration for google_cloud_tasks_queue resource.
It happens only when max_retry_duration=0s. Please find plan output below:

  # google_cloud_tasks_queue.this will be updated in-place
  ~ resource "google_cloud_tasks_queue" "this" {
        id       = "projects/everon-test/locations/europe-west1/queues/demo"
        location = "europe-west1"
        name     = "demo"
        project  = "everon-test"

        rate_limits {
            max_burst_size            = 100
            max_concurrent_dispatches = 1000
            max_dispatches_per_second = 500
        }
      ~ retry_config {
            max_attempts       = -1
            max_backoff        = "3600s"
            max_doublings      = 16
          + max_retry_duration = "0s"
            min_backoff        = "0.100s"
        }
    }

gcloud output for max_retry_duration = "0s":

$ gcloud tasks queues describe demo
name: projects/everon-test/locations/europe-west1/queues/demo
rateLimits:
  maxBurstSize: 100
  maxConcurrentDispatches: 1000
  maxDispatchesPerSecond: 500.0
retryConfig:
  maxAttempts: -1
  maxBackoff: 3600s
  maxDoublings: 16
  minBackoff: 0.100s
state: RUNNING

gcloud output for max_retry_duration = "1s":

$ gcloud tasks queues describe demo
name: projects/everon-test/locations/europe-west1/queues/demo
rateLimits:
  maxBurstSize: 100
  maxConcurrentDispatches: 1000
  maxDispatchesPerSecond: 500.0
retryConfig:
  maxAttempts: -1
  maxBackoff: 3600s
  maxDoublings: 16
  maxRetryDuration: 1s
  minBackoff: 0.100s
state: RUNNING

Steps to Reproduce

  • Enable Cloud Tasks API
  • Create google_cloud_tasks_queue with unlimited (0s) max_retry_duration. Please use example in Terraform Configuration Files section.
  • Run terraform apply

Important Factoids

References

  • #0000
@ghost ghost added bug labels Dec 16, 2020
@edwardmedia edwardmedia self-assigned this Dec 16, 2020
@edwardmedia
Copy link
Contributor

max_retry_duration is NOT included in the API response when it is set to 0s

@omelnyk1
Copy link
Author

@edwardmedia you're right. Would be nice to handle that responses in terraform plugin.

@ghost
Copy link

ghost commented Jan 23, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 23, 2021
@github-actions github-actions bot added service/cloudtasks forward/review In review; remove label to forward labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.