Skip to content

Commit

Permalink
data-source/aws_glue_script: Address #4481 PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed May 22, 2018
1 parent 717ef12 commit 9cafba8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions aws/data_source_aws_glue_script.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"log"
"time"

"github.com/hashicorp/terraform/helper/validation"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/glue"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
)

func dataSourceAwsGlueScript() *schema.Resource {
Expand Down Expand Up @@ -102,9 +101,12 @@ func dataSourceAwsGlueScript() *schema.Resource {
func dataSourceAwsGlueScriptRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).glueconn

dagEdge := d.Get("dag_edge").([]interface{})
dagNode := d.Get("dag_node").([]interface{})

input := &glue.CreateScriptInput{
DagEdges: expandGlueCodeGenEdges(d.Get("dag_edge").([]interface{})),
DagNodes: expandGlueCodeGenNodes(d.Get("dag_node").([]interface{})),
DagEdges: expandGlueCodeGenEdges(dagEdge),
DagNodes: expandGlueCodeGenNodes(dagNode),
}

if v, ok := d.GetOk("language"); ok && v.(string) != "" {
Expand Down
8 changes: 4 additions & 4 deletions website/docs/d/glue_script.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ output "scala_code" {

* `args` - (Required) Nested configuration an argument or property of a node. Defined below.
* `id` - (Required) A node identifier that is unique within the node's graph.
* `line_number` - (Optional) The line number of the node.
* `node_type` - (Required) The type of node this is.
* `line_number` - (Optional) The line number of the node.

#### args Argument Reference

* `name` - (Required) The name of the argument or property.
* `param` - (Optional) Boolean if the value is used as a parameter. Defaults to `false`.
* `value` - (Required) The value of the argument or property.
* `param` - (Optional) Boolean if the value is used as a parameter. Defaults to `false`.

## Attributes Reference

* `python_script` - The Python script generated from the DAG. The `language` argument must be set to `PYTHON`.
* `scala_code` - The Scala code generated from the DAG. The `language` argument must be set to `SCALA`.
* `python_script` - The Python script generated from the DAG when the `language` argument is set to `PYTHON`.
* `scala_code` - The Scala code generated from the DAG when the `language` argument is set to `SCALA`.

0 comments on commit 9cafba8

Please sign in to comment.