-
Notifications
You must be signed in to change notification settings - Fork 80
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
[Bug]: Unable to refer the notificationChannels
in GCP AlertPolicy using NotificationChannel name as documented
#498
Comments
Hi @avijitsarkar123, Thank you for bringing up this issue. As I understand independent of the As I see, you are using an old version of the monolithic provider. I could not reproduce the bug with the latest version. Could you please try with And please take note: The monolithic package is deprecated in favor of the family resource packages and will no longer be maintained after 12 June 2024 |
This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as |
This issue is being closed since there has been no activity for 14 days since marking it as |
@turkenf I can reproduce the same error with Could you suggest how to reference the notification channel from alert policy? Resource MRs required to reproduce the bugapiVersion: monitoring.gcp.upbound.io/v1beta1
kind: AlertPolicy
metadata:
annotations:
meta.upbound.io/example-id: monitoring/v1beta1/alertpolicy
labels:
testing.upbound.io/example-name: example_alert_policy
name: example-alert-policy
spec:
forProvider:
combiner: OR
conditions:
- conditionThreshold:
- aggregations:
- alignmentPeriod: 60s
perSeriesAligner: ALIGN_RATE
comparison: COMPARISON_GT
duration: 60s
filter: metric.type="compute.googleapis.com/instance/disk/write_bytes_count" AND
resource.type="gce_instance"
displayName: test condition
displayName: My Alert Policy
notificationChannels:
- example-notification-channel
userLabels:
foo: bar
---
apiVersion: monitoring.gcp.upbound.io/v1beta1
kind: NotificationChannel
metadata:
annotations:
meta.upbound.io/example-id: monitoring/v1beta1/notificationchannel
labels:
testing.upbound.io/example-name: example_notification_channel
name: example-notification-channel
spec:
forProvider:
displayName: Test Notification Channel
labels:
email_address: [email protected]
type: email |
Do we have any updates here? seems like it is still a problem in the latest provider-gcp-monitoring:v1.8.3 provider. |
Interested in this as well. Is it possible to refer to the notification channel by NotificationChannel resource rather than the GCP name/path? Or is there no way to do this and the NotificationChannel resource has to be created first, then the status.id or status.name extracted, put into the AlertPolicy, after which the AlertPolicy can be applied? |
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
NotificationChannel Manifest:
AlertPolicy Manifest
Steps to Reproduce
Create a GCP notificationChannel and then try to add it to the AlertPolicy
What happened?
The AlertPolicy is erroring out
Relevant Error Output Snippet
Error on the AlertPolicy apply failed: Error creating AlertPolicy: googleapi: Error 400: Name must begin with 'projects/{project_id}/notificationChannels/{channel_id}', got: my-sample-app-notification-email-channel:
The text was updated successfully, but these errors were encountered: