Egp Policy
Provides a resource to manage Endpoint Governing Policy (EGP) via Sentinel. Note this feature is available only with Vault Enterprise.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const allow_all = new vault.EgpPolicy("allow-all", {
name: "allow-all",
paths: ["*"],
enforcementLevel: "soft-mandatory",
policy: `main = rule {
true
}
`,
});
Content copied to clipboard
import pulumi
import pulumi_vault as vault
allow_all = vault.EgpPolicy("allow-all",
name="allow-all",
paths=["*"],
enforcement_level="soft-mandatory",
policy="""main = rule {
true
}
""")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var allow_all = new Vault.EgpPolicy("allow-all", new()
{
Name = "allow-all",
Paths = new[]
{
"*",
},
EnforcementLevel = "soft-mandatory",
Policy = @"main = rule {
true
}
",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.NewEgpPolicy(ctx, "allow-all", &vault.EgpPolicyArgs{
Name: pulumi.String("allow-all"),
Paths: pulumi.StringArray{
pulumi.String("*"),
},
EnforcementLevel: pulumi.String("soft-mandatory"),
Policy: pulumi.String("main = rule {\n true\n}\n"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.EgpPolicy;
import com.pulumi.vault.EgpPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var allow_all = new EgpPolicy("allow-all", EgpPolicyArgs.builder()
.name("allow-all")
.paths("*")
.enforcementLevel("soft-mandatory")
.policy("""
main = rule {
true
}
""")
.build());
}
}
Content copied to clipboard
resources:
allow-all:
type: vault:EgpPolicy
properties:
name: allow-all
paths:
- '*'
enforcementLevel: soft-mandatory
policy: |
main = rule {
true
}
Content copied to clipboard