Following the docs, I tried setting up my policy resource with a schedule resource using the terraform ${pagerduty_schedule.example.id} syntax but the following error is shown in the policy events:
Warning CannotObserveExternalResource 20s (x17 over 16m) managed/escalation.pagerduty.crossplane.io/v1alpha1, kind=policy cannot run refresh: refresh failed: Reference to undeclared resource: A managed resource "pagerduty_schedule" "example" has not been declared in the root module.
How can we reproduce it?
I tried using the following code:
apiVersion: schedule.pagerduty.crossplane.io/v1alpha1
kind: Schedule
metadata:
name: example
labels:
schedule: example
annotations:
crossplane.io/external-name: xxx # redacted
spec:
managementPolicies: ["Observe"]
forProvider: {}
---
apiVersion: escalation.pagerduty.crossplane.io/v1alpha1
kind: Policy
metadata:
labels:
escalation-policy: example
name: example
spec:
forProvider:
name: example Escalation Policy
description: Managed by Crossplane
numLoops: 2
teamSelector:
matchLabels:
team: example-team
rule:
- escalationDelayInMinutes: 10
target:
- id: ${pagerduty_schedule.example.id}
type: schedule_reference
I made sure the schedule managed resource is populated with real data from the external resource, including its id.
What happened?
Following the docs, I tried setting up my policy resource with a schedule resource using the terraform
${pagerduty_schedule.example.id}
syntax but the following error is shown in the policy events:How can we reproduce it?
I tried using the following code:
I made sure the schedule managed resource is populated with real data from the external resource, including its id.
What environment did it happen in?
Crossplane version: v1.15.0 Provider version: v0.6.1
Kubernetes: GKE 1.28