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

OSConfig Rollout Disruption Budget Does Not Allow for Percent #7612

Open
invalidbassist opened this issue Oct 23, 2020 · 1 comment
Open
Assignees
Labels
bug forward/review In review; remove label to forward service/osconfig

Comments

@invalidbassist
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

12.28

Affected Resource(s)

  • google_os_config_patch_deployment

Terraform Configuration Files

resource "google_os_config_patch_deployment" "windows-patches" {
  project             = "your-project-id-here"
  patch_deployment_id = "windows-patches-01"
  instance_filter {
    group_labels {
      labels = {
        os-type = "windows"
      }
    }
    zones = ["us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f"]
  }

  patch_config {
    reboot_config = "DEFAULT"

    windows_update {
      classifications = ["CRITICAL", "SECURITY", "UPDATE"]
    }
  }

  recurring_schedule {
    time_zone {
      id = var.patch_schedule_timezone
    }

    time_of_day {
      hours   = 07
      minutes = 00
    }

    monthly {
      week_day_of_month {
        week_ordinal = 1
        day_of_week  = "WEDNESDAY"
      }
    }
  }
  rollout {
    mode = "ZONE_BY_ZONE"
    disruption_budget {
      percent = 50
    }
  }
}

Debug Output

https://github.com/Cloudbakers/cloudops-config-mgmt/blob/bug-testing/terraform/testing/debug

Panic Output

Expected Behavior

The API for OSConfig requires percent for disruption budget: https://cloud.google.com/compute/docs/osconfig/rest/v1/PatchRollout#fixedorpercent - terraform should deploy the os patch deployment resource without error when percent (or percentage) is requested.

Actual Behavior

The google_os_config_patch_deployment resource requires that the key value pair for the disruption_budget in the rollout block be fixed or percentage. When trying to deploy with the API-required percent, the resource fails to deploy because it does not recognize percent as an acceptable input. Once changed to percentage and applied, the deployment fails because the API does not recognize percentage as an acceptable option. The only successful google_os_patch_deployment deployment is with a fixed value disruption budget.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@ghost ghost added the bug label Oct 23, 2020
@invalidbassist
Copy link
Author

I am working on a PR to resolve this as it is an update to the api.yaml for the magic modules - expect this process shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forward/review In review; remove label to forward service/osconfig
Projects
None yet
Development

No branches or pull requests

2 participants