---
title: "Octopus Easy Mode - Policies"
url: https://daily.dev/posts/octopus-easy-mode---policies-a2bj9tghs
source_url: https://octopus.com/blog/octo-easy-mode-22-policy
type: article
source: "OctopusDeploy"
published: 2026-08-17T11:20:14.915Z
updated: 2026-08-17T11:20:38.772Z
tags: ["devops", "cicd", "policy-as-code", "octopus-deploy"]
reading_time: 7
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Octopus Easy Mode - Policies

**[OctopusDeploy](https://daily.dev/sources/octopusdeploy)** · 7 min read · 1 upvotes · 0 comments

## Summary

A hands-on walkthrough shows how to use Octopus Deploy's Platform Hub to define and enforce Open Policy Agent (OPA) policies written in Rego. The guide creates a policy requiring a Self-Support process template to exist in all deployment projects, covering both Scope Rego (which projects the policy applies to) and Conditions Rego (the policy logic itself). It demonstrates publishing the policy in warning mode to identify non-compliant projects via the audit log without disrupting deployments, then switching the Violation Action to Block to enforce compliance and fail non-conforming deployments. The piece closes with notes on setting up subscriptions for notifications and moving the policy into a real Git repository.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://octopus.com/blog/octo-easy-mode-22-policy>

## Questions this post answers

### How do I write an Open Policy Agent policy in Octopus Deploy to require a specific process template on every deployment?

Write a Conditions Rego policy that defaults to denying deployments, then allows them only when a step's Source.Type equals "Process Template" and step.Source.SlugOrId matches the template's slug, the step is not in SkippedSteps, and step.Enabled is true. Pair it with a Scope Rego block that limits which spaces or environments the policy applies to, for example matching input.Space.Id to a specific space.

_Teams standardizing deployment governance can track Octopus Platform Hub policy patterns like this on daily.dev._

### How can I test a new deployment policy in Octopus Deploy without breaking existing deployments?

Set the policy's Violation Action to Warning instead of Block before publishing it. Non-compliant deployments will still succeed, but the audit log records a warning under the event category "Compliance Policy evaluated as non-compliant with warning outcome," letting you identify which projects need fixes before switching the action to Block and enforcing it.

_Anyone rolling out compliance rules gradually can follow deployment governance workflows like this on daily.dev._

## Similar posts on daily.dev

- [Introducing Starter Policies in Platform Hub](https://daily.dev/posts/introducing-starter-policies-in-platform-hub-mj3maap5r) · OctopusDeploy · 0 upvotes · 0 comments
- [Policies are now Generally Available](https://daily.dev/posts/policies-are-now-generally-available-blzzndykf) · OctopusDeploy · 1 upvotes · 0 comments
- [Practical Platform Engineering in 5 Lunches: 5. Policies](https://daily.dev/posts/practical-platform-engineering-in-5-lunches-5-policies-dckf6bube) · OctopusDeploy · 0 upvotes · 0 comments
- [Octopus Easy Mode - Self Support](https://daily.dev/posts/octopus-easy-mode---self-support-jtcrxcfwq) · OctopusDeploy · 0 upvotes · 0 comments

---

Tags: [#devops](https://daily.dev/tags/devops), [#cicd](https://daily.dev/tags/cicd), [#policy-as-code](https://daily.dev/tags/policy-as-code), [#octopus-deploy](https://daily.dev/tags/octopus-deploy)

[View this post on daily.dev](https://daily.dev/posts/octopus-easy-mode---policies-a2bj9tghs)
