Skip to content

Rego code - Help Needed!!! #288

Oct 19, 2022 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

👉 https://play.openpolicyagent.org/p/0W4YtEmda0 I gave it a go here:

package example

import future.keywords.every
import future.keywords.if
import future.keywords.in

default allow_update_cname := false
allow_update_cname if some resource in resources("CNAME")

default allow_update_a := false
allow_update_a if some resource in resources("A")

default allow_update_ns := false
allow_update_ns if some resource in resources("NS")

default allow_update_caa := false
allow_update_caa if some resource in resources("CAA")

resources(type) := {r | some r in input[""]; r.type == type}

deny[msg] {
	some resource in resources("MX")
	msg := sprintf("dns_record '%v' Our policy recommends no changes to…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@srenatus
Comment options

@sbalakrishn
Comment options

@sbalakrishn
Comment options

@srenatus
Comment options

@sbalakrishn
Comment options

Answer selected by srenatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants