-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 feat implement dagster code location from document (#60)
Co-authored-by: Nico Gelders <[email protected]> Co-authored-by: Quinten Bruynseraede <[email protected]>
- Loading branch information
1 parent
6280fb2
commit 79fb6fb
Showing
14 changed files
with
1,111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "dagster_code_location_from_document Resource - dagster" | ||
subcategory: "" | ||
description: |- | ||
Creates a code location from a dagster configuration document. | ||
--- | ||
|
||
# dagster_code_location_from_document (Resource) | ||
|
||
Creates a code location from a dagster configuration document. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "dagster_code_location_from_document" "example" { | ||
document = data.dagster_configuration_document.example.json | ||
} | ||
data "dagster_configuration_document" "example" { | ||
yaml_body = <<YAML | ||
location_name: "example_code_location_from_document" | ||
code_source: | ||
python_file: "a_python_file.py" | ||
YAML | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `document` (String) Code location as a JSON document. We recommend using a `dagster_configuration_document` to generate this instead of composing a JSON document yourself. | ||
|
||
### Read-Only | ||
|
||
- `name` (String) Code location name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
variable "organization" { | ||
type = string | ||
} | ||
|
||
variable "deployment" { | ||
type = string | ||
} | ||
|
||
variable "api_token" { | ||
type = string | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.3.5" | ||
|
||
required_providers { | ||
dagster = { | ||
source = "datarootsio/dagster" | ||
} | ||
} | ||
|
||
backend "local" { | ||
path = "terraform.tfstate" | ||
} | ||
} | ||
|
||
provider "dagster" { | ||
organization = var.organization | ||
deployment = var.deployment | ||
api_token = var.api_token | ||
} | ||
|
||
resource "dagster_code_location_from_document" "example" { | ||
document = data.dagster_configuration_document.example.json | ||
} | ||
|
||
data "dagster_configuration_document" "example" { | ||
yaml_body = <<YAML | ||
location_name: "example_code_location_from_document" | ||
code_source: | ||
python_file: "a_python_file.py" | ||
YAML | ||
} | ||
|
||
output "code_location" { | ||
value = dagster_code_location_from_document.example | ||
} |
11 changes: 11 additions & 0 deletions
11
examples/resources/dagster_code_location_from_document/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
resource "dagster_code_location_from_document" "example" { | ||
document = data.dagster_configuration_document.example.json | ||
} | ||
|
||
data "dagster_configuration_document" "example" { | ||
yaml_body = <<YAML | ||
location_name: "example_code_location_from_document" | ||
code_source: | ||
python_file: "a_python_file.py" | ||
YAML | ||
} |
Oops, something went wrong.