weaveworks / policy-agent

Weaveworks Policy Agent
Mozilla Public License 2.0
32 stars 14 forks source link

There is no way to enable terraform admission #221

Closed raz-bn closed 6 months ago

raz-bn commented 6 months ago

version: v2.5.0 There is no way to configure the terraform admission, therefore, there is no way to use the feature.

https://github.com/weaveworks/policy-agent/blob/57e5af9172b00e1b2733ce22c7ac465eea72ca33/configuration/config.go#L77

This function does not init the TFAdmissionConfig struct

https://github.com/weaveworks/policy-agent/blob/57e5af9172b00e1b2733ce22c7ac465eea72ca33/configuration/config.go#L57

therefore this condition can never be met

https://github.com/weaveworks/policy-agent/blob/57e5af9172b00e1b2733ce22c7ac465eea72ca33/main.go#L240

raz-bn commented 6 months ago

my bad, had to use this config:

config:
  logLevel: debug
  accountId: ""
  clusterId: ""
  tfAdmission:
    enabled: true
    sinks:
      k8sEventsSink:
        enabled: true
  admission:
    enabled: false
    sinks:
      k8sEventsSink:
        enabled: true
  audit:
    enabled: true