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

Add b2_bucket_notification_rules resource and data source #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlech-reef
Copy link
Collaborator

@mlech-reef mlech-reef commented Nov 3, 2024

Closes #90

Schema:

resource "b2_bucket_notification_rules" "example" {
  bucket_id = b2_bucket.example.id
  notification_rules {
    name = "test-rule-1"
    event_types = [
      "b2:ObjectCreated:*",
      "b2:ObjectDeleted:*",
    ]
    is_enabled         = true  # optional: default true
    object_name_prefix = ""  # optional, default ""
    target_configuration {  # optional
      target_type                = "webhook"
      url                        = "https://example.com/webhook"
      hmac_sha256_signing_secret = "..." # optional
      custom_headers {  # optional
        name  = "myCustomHeader1"
        value = "myCustomHeaderVal1"
      }
    }
  }
  # is_suspended = false  # computed
  # suspension_reason = ""  # computed
}
data "b2_bucket_notification_rules" "example" {
  bucket_id = b2_bucket.example.bucket_id
  depends_on = [
    b2_bucket_notification_rules.example,
  ]
}

@ppolewicz
Copy link
Collaborator

some tests failed

@mlech-reef
Copy link
Collaborator Author

some tests failed

Because the API key doesn't have the proper permissions.

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

Successfully merging this pull request may close these issues.

Feature request: B2 Event Notifications
3 participants