Looks up a StackGen governance configuration by id or name and returns the latest version details. Use version_id with sg_governance_assignment to attach an existing governance config to a workspace.
data "sg_governance" "baseline" {
name = "default-prod-governance"
}
resource "sg_governance_assignment" "new_workspace" {
governance_version_id = data.sg_governance.baseline.version_id
workspace_id = sg_project.new.id
}
id (String) Governance configuration UUID. Provide id or name.name (String) Governance configuration name. Provide id or name.owner_id (String) Owner UUID to search under. Defaults to the all-zero UUID for Tenant.owner_type (String) Owner type to search under. Defaults to Tenant.allowed_target_compute (List of String) Allowed target compute values on the latest version.custom_resource_restriction_policies (List of String) Resource restriction policy UUIDs on the latest version.custom_resource_security_policies (List of String) Custom resource security policy UUIDs on the latest version.description (String) Description of the latest governance version.required_security_policies (List of String) Required security policy UUIDs on the latest version.required_terraform_block (Attributes) Required terraform block on the latest version, if set.version (Number) Integer version number of the latest governance version.version_id (String) UUID of the latest governance version.