generated from abbeylabs/abbey-starter-kit-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
54 lines (48 loc) · 1.29 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
terraform {
backend "http" {
address = "https://api.abbey.io/terraform-http-backend"
lock_address = "https://api.abbey.io/terraform-http-backend/lock"
unlock_address = "https://api.abbey.io/terraform-http-backend/unlock"
lock_method = "POST"
unlock_method = "POST"
}
required_providers {
abbey = {
source = "abbeylabs/abbey"
version = "0.2.6"
}
}
}
provider "abbey" {
# Configuration options
bearer_auth = var.abbey_token
}
resource "abbey_grant_kit" "abbey_demo_site" {
name = "Abbey_Demo_Site"
description = <<-EOT
Grants access to Abbey's Demo Page.
EOT
workflow = {
steps = [
{
reviewers = {
one_of = ["[email protected]"] # CHANGEME
}
}
]
}
policies = [
{ bundle = "github://kapicic/abbeytest/policies" } # CHANGEME
]
output = {
# Replace with your own path pointing to where you want your access changes to manifest.
# Path is an RFC 3986 URI, such as `github://{organization}/{repo}/path/to/file.tf`.
location = "github://kapicic/abbeytest/access.tf" # CHANGEME
append = <<-EOT
resource "abbey_demo" "grant_read_write_access" {
permission = "read_write"
email = "{{ .data.system.abbey.identities.abbey.email }}"
}
EOT
}
}