Outputs
Last updated
Last updated
Outputs are templates that defines how and where your grants should materialize. An Output will generate native Terraform code to be stored in your Version Control System (VCS).
Outputs are written using the Grant Kit's Workflows DSL as native Terraform HCL code.
Writing Outputs consists of four steps:
.
.
.
.
location
A Grant Kit's Output defines how and where your access grants should materialize. The location
attribute represents the where.
The location
defines which file and at what path you want your access changes to materialize into. This is a RFC 3986 URI string. You can configure any path and any file name. Abbey will create the paths and file for you if they don't exist.
Abbey will automatically manage access through the file you specified at location
.
Abbey supports one Output Strategy:
append
: Access changes are treated as a new Terraform Resource block and appended to the access Terraform file at location
.
A Grant Kit's Output defines how and where your access grants should materialize. The Output's append
block represents the how.
In order to configure meaningful Grant Kit Outputs, you need to be able to configure dynamic strings rather that static strings from the examples above. Abbey supports this through variable interpolation.
When an access request is made, Abbey performs two layers of variable interpolation:
Go text/template Interpolation.
Usage
To interpolate variables, use ${some_variable_name}
.
You can interpolate any of your existing Terraform objects such as resource
and data
objects.
You can also interpolate the resource name of the output. This can be used to create multiple of the same resources for different requests.
Usage
To interpolate variables, use {{ .some_variable_name }}
.
Output Materialization has three stages:
Interpolate Terraform variables.
Interpolate Enriched Data variables.
Generate Output to your location
.
A common deployment failure for grant kits is a misconfigured location
field in the output
block
Double check it starts with github://
Double check repository and username or org name is correct
These fields are case-sensitive so double check any upper/lowercase letters
Double check for any extra :
or /
's
Double check the path to your output location exists
Note: Abbey will create the file for you if it doesn't exist, but will not create directories.
It contains a string value, typically a multiline for better visibility. The contents of this string is HCL code generally using OSS Terraform Providers from the that map to the resources you want Abbey to manage.
.
Abbey will first perform . This happens when an access request is made it's now time to generate Output based on your append
block.
Since the contents of the append
block is a Terraform string, Abbey will interpolate variables using .
Next, Abbey will perform Go Interpolation. This happens after the output of .
Abbey provides as variables for you to interpolate.
Abbey materializes output to a Terraform file based on what you configured in your append
block and after applying and .