Skip to main content

write_rules_pack

Function write_rules_pack 

Source
pub fn write_rules_pack(
    env_root: &Path,
    deployer: &PackDescriptor,
    pack: &RulesPack,
) -> Result<PathBuf, RulesExportError>
Expand description

Write pack to <env_root>/rules/<deployer-path>/ and return the env-relative path to the directory (for CredentialsBootstrap.rules_pack_ref).

Empty packs return a path to an empty directory — kept structural so the bootstrap doc always has a rules_pack_ref regardless of whether the deployer emitted any IaC. An empty pack is honest about deployers (like local-process) that have nothing to apply offline; they should prefer super::BootstrapError::NotApplicable over an empty pack, but the writer accepts both.