Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Unable to use Refs #205

Open
linuxbsdfreak opened this issue Aug 30, 2022 · 0 comments
Open

Unable to use Refs #205

linuxbsdfreak opened this issue Aug 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@linuxbsdfreak
Copy link

linuxbsdfreak commented Aug 30, 2022

What problem are you facing?

Unable to use Refs

How could Crossplane help solve your problem?

I have the following yaml definition which at the moment one has to manually add the id for the logAnalyticsWorkspaceId, targetResourceId, actionGroupId,scopes. It would be ideal to configure Refs for adding it dynamically. Is this feature enabled globally in all the provider?

apiVersion: insights.azure.jet.crossplane.io/v1alpha1
kind: MonitorActionGroup
metadata:
  name: cp-terrajet-ag
spec:
  forProvider:
    emailReceiver:
    - emailAddress: [email protected]
      name: sendtoadmin
    name: cp-terrajet-ag
    resourceGroupNameRef:
      name: cp-terrajet-rg
    shortName: cp-tjet-ag
  providerConfigRef:
    name: terrajet-azure-provider-config
---
apiVersion: insights.azure.jet.crossplane.io/v1alpha2
kind: MonitorMetricAlert
metadata:
  name: terrajet-pg-high-cpu-alert
spec:
  forProvider:
    resourceGroupNameRef:
      name: cp-terrajet-rg
    scopes:
      - "/subscriptions/xxxxxxx/resourceGroups/cp-terrajet-rg/providers/Microsoft.DBforPostgreSQL/servers/terrajet-psqlserver"
    criteria:
      - metricNamespace: "Microsoft.DBforPostgreSQL/servers"
        metricName: "cpu_percent"
        aggregation: "Average"
        operator: "GreaterThan"
        threshold: 95
    description: "PostgreSQL high CPU alert"
    action:
      - actionGroupId: "/subscriptions/xxxx/resourceGroups/cp-terrajet-rg/providers/Microsoft.Insights/actionGroups/cp-terrajet-ag"
    frequency: "PT1M"
    windowSize: "PT30M"
  providerConfigRef:
    name: terrajet-azure-provider-config
---
apiVersion: loganalytics.azure.jet.crossplane.io/v1alpha2
kind: Workspace
metadata:
  name: cp-terrajet-ws
spec:
  forProvider:
    location: "westeurope"
    resourceGroupNameRef:
      name: cp-terrajet-rg
    retentionInDays: 45
  providerConfigRef:
    name: terrajet-azure-provider-config
---
apiVersion: insights.azure.jet.crossplane.io/v1alpha1
kind: MonitorDiagnosticSetting
metadata:
  name: cp-terrajet-mds
spec:
  forProvider:
    log:
    - category: PostgreSQLLogs
      enabled: true
    metric:
    - category: AllMetrics
      enabled: true
    name: cp-terrajet-mds
    logAnalyticsWorkspaceId: "/subscriptions/xxxxxx/resourceGroups/cp-terrajet-rg/providers/Microsoft.OperationalInsights/workspaces/cp-terrajet->
    targetResourceId: "/subscriptions/xxxx/resourceGroups/cp-terrajet-rg/providers/Microsoft.DBforPostgreSQL/servers/terrajet-psqlserver"
  providerConfigRef:
    name: terrajet-azure-provider-config
@linuxbsdfreak linuxbsdfreak added the enhancement New feature or request label Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant