terraform-provider-cedar

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 5 Imported by: 0

README

terraform-provider-cedar

This provider exposes a Terraform Data Source for authoring Cedar policies:

data "cedar_policyset" "example" {
  policy {
    effect = "permit"

    principal_in = {
      type = "Group"
      id   = "admins"
    }
    action = {
      type = "Action"
      id   = "Read"
    }
    any_resource = true

    when {
      text = "resource.is_public"
    }
    unless {
      text = "resource.owner == User::\"alice\""
    }
  }
}

The data.cedar_policyset.example.text output will be:

permit (
    principal in Group::"admins",
    action == Action::"Read",
    resource,
)
when {
    resource.is_public
}
unless {
    resource.owner == User::"alice"
};

For more information, read the Cedar documentation.

This Terraform provider was created by Common Fate. We've built an access management platform based on Cedar. Read our documentation or get in touch if you'd like to learn more.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

make testacc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg
eid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL