Open donovanmuller opened 1 year ago
I hit this problem today with the SubscriptionFilter
The filter takes a destinationArnRef
or destinationArnSelector
is based on [destinationArn](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html#API_PutSubscriptionFilter_RequestSyntax)
The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
I want to create a subscription for destination to Kinesis Data Firehose but only Amazon Kinesis stream is supported
I tried the following, having a Delivery system with labels
apiVersion: firehose.aws.upbound.io/v1beta1
kind: DeliveryStream
metadata:
labels:
crossplane.io/claim-name: test-logs-firehose-s3-lambda
crossplane.io/claim-namespace: default
firehoseapps.awsblueprints.io/app: firehose
...
I create a subscription with destinationArnSelector
apiVersion: cloudwatchlogs.aws.upbound.io/v1beta1
kind: SubscriptionFilter
metadata:
name: dynatrace-aws-logs-test
spec:
forProvider:
destinationArnSelector:
matchLabels:
crossplane.io/claim-name: test-logs-firehose-s3-lambda
crossplane.io/claim-namespace: default
firehoseapps.awsblueprints.io/app: firehose
filterPattern: ""
logGroupName: "/aws/eks/crossplane-blueprints/cluster"
name: "dynatrace-aws-logs-test"
region: "us-east-1"
...
I get error
message: 'cannot resolve references: mg.Spec.ForProvider.DestinationArn: no resources
matched selector'
reason: ReconcileError
I am afraid this is a limitation of how Cross Resource References are designed and implemented in Crossplane. Resource references are defined at build time and to only one other type.
Generic Cross-Resource References would be the solution for the problem described here and is one of our top priorities.
If your resources exist in the same composition, you can patch the value as a workaround today.
What problem are you facing?
Currently, you can add a single, explicit reference, to another resource like this example for
google_cloud_scheduler_job
:However, some resources can accept references for multiple Types. In the example above, Both a
Topic
and aLiteTopic
are supported. Upjet currently does not allow multiple references, of different Types, for a single argument.How could Terrajet help solve your problem?
Allow specifying multiple supported reference Types for an argument. E.g.
Terrajet community example here.