figma/terraform-provider-aws-4-49-0

[Docs]: Outdated documentation for aws_emr_cluster step and hadoop_jar_step variables

Opened this issue · 0 comments

Documentation Link

https://registry.terraform.io/providers/figma/aws-4-49-0/latest/docs/resources/emr_cluster#enable-debug-logging

Description

Under the section [Enable Debug Logging(https://registry.terraform.io/providers/figma/aws-4-49-0/latest/docs/resources/emr_cluster#enable-debug-logging), step and hadoop_jar_step requires a list instead of a map.

It should be updated from:

resource "aws_emr_cluster" "example" {
  # ... other configuration ...

  step {
    action_on_failure = "TERMINATE_CLUSTER"
    name              = "Setup Hadoop Debugging"

    hadoop_jar_step {
      jar  = "command-runner.jar"
      args = ["state-pusher-script"]
    }
  }

  # Optional: ignore outside changes to running cluster steps
  lifecycle {
    ignore_changes = [step]
  }
}

To the following:

resource "aws_emr_cluster" "example" {
  # ... other configuration ...

  step = [{
    action_on_failure = "TERMINATE_CLUSTER"
    name              = "Setup Hadoop Debugging"

    hadoop_jar_step = [{
      jar  = "command-runner.jar"
      args = ["state-pusher-script"]
    }]
  }]

  # Optional: ignore outside changes to running cluster steps
  lifecycle {
    ignore_changes = [step]
  }
}

For step, this is also supported by the aws emr create-cluster documentation where --step requires a list of steps to be executed by the cluster.

Error received when a map is submitted to the step variable:
step_error

Error received when a map is submitted to the hadoop_jar_step variable:
hadoop_jar_step_error

References

https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html

Would you like to implement a fix?

Yes