Terraform · Arazzo Workflow
Terraform Onboard a Sentinel or OPA Policy
Version 1.0.0
Check whether a policy already exists in an organization, create it if not, and read it back.
View Spec
View on GitHub
Infrastructure As CodeCloud InfrastructureDevOpsOpen SourceHashiCorpArazzoWorkflows
Provider
Workflows
onboard-policy
Idempotently add a policy to an organization at a given enforcement level.
Verifies the organization, checks the existing policy list for the target name, creates the policy when absent, and confirms its enforcement level on either branch.
1
verifyOrganization
GetOrganization
Read the organization to confirm the token can reach it and govern it.
2
listPolicies
ListPolicies
List the organization's policies so a policy that has already been onboarded is not created a second time under the same name.
3
createPolicy
CreatePolicy
Create the policy with the supplied engine and enforcement level, since no policy with this name exists in the organization yet.
4
readNewPolicy
GetPolicy
Read the freshly created policy back to confirm the enforcement level and engine that HCP Terraform actually recorded.
5
readExistingPolicy
GetPolicy
Read the already-present policy instead of creating a duplicate, reporting the enforcement level currently in force so drift from the intended level is visible to the caller.