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

Can't convert ValidatingWebhookConfiguration #134

Open
JordanP opened this issue Sep 17, 2024 · 0 comments
Open

Can't convert ValidatingWebhookConfiguration #134

JordanP opened this issue Sep 17, 2024 · 0 comments

Comments

@JordanP
Copy link

JordanP commented Sep 17, 2024

Hi,
Thanks for the wonderful program !

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: cnpg-validating-webhook-configuration
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    service:
      name: cnpg-webhook-service
      namespace: cnpg-system
      path: /validate-postgresql-cnpg-io-v1-backup
  failurePolicy: Fail
  name: vbackup.cnpg.io
  rules:
  - apiGroups:
    - postgresql.cnpg.io
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - backups
  sideEffects: None

gives

resource "kubernetes_validating_webhook_configuration" "cnpg_validating_webhook_configuration" {
  metadata {
    name = "cnpg-validating-webhook-configuration"
  }
  webhook {
    name = "vbackup.cnpg.io"
    client_config {
      service {
        namespace = "cnpg-system"
        name      = "cnpg-webhook-service"
        path      = "/validate-postgresql-cnpg-io-v1-backup"
      }
    }
    rule {
      operations = ["CREATE", "UPDATE"]
    }
    failure_policy            = "Fail"
    side_effects              = "None"
    admission_review_versions = ["v1"]
  }
}

For some reason, the rule block is incomplete.

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