Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_emr_cluster: Set SchemaConfigModeAttr on step configuration block attribute #8228

Merged
merged 1 commit into from
Apr 9, 2019

Commits on Apr 6, 2019

  1. resource/aws_emr_cluster: Set SchemaConfigModeAttr on step configurat…

    …ion block attribute
    
    References:
    
    * hashicorp/terraform#20505
    * hashicorp/terraform#20626
    
    In Terraform 0.12, behaviors with configuration blocks are more explicit to allow configuration language improvements and remove ambiguities that required various undocumented workarounds in Terraform 0.11 and prior. As a consequence, configuration blocks that are marked `Optional: true` and `Computed: true` will no longer support explicitly zero-ing out the configuration without special implementation.
    
    The `ConfigMode` schema parameter on the configuration block attribute allows the schema to override certain behaviors. In particular, setting `ConfigMode: schema.SchemaConfigModeAttr` will allow practitioners to continue setting the configuration block attribute to an empty list (in the semantic sense, e.g. `attr = []`), keeping this prior behavior in Terraform 0.12. This parameter does not have any effect with Terraform 0.11. This solution may be temporary or revisited in the future.
    
    Previous output from Terraform 0.11:
    
    ```
    --- PASS: TestAccAWSEMRCluster_Step_ConfigMode (828.01s)
    ```
    
    Previous output from Terraform 0.12:
    
    ```
    --- FAIL: TestAccAWSEMRCluster_Step_ConfigMode (390.69s)
        testing.go:568: Step 4 error: config is invalid: Unsupported argument: An argument named "step" is not expected here. Did you mean to define a block of type "step"?
    ```
    
    Output from Terraform 0.11:
    
    ```
    --- PASS: TestAccAWSEMRCluster_Step_ConfigMode (764.03s)
    ```
    
    Output from Terraform 0.12:
    
    ```
    --- PASS: TestAccAWSEMRCluster_Step_ConfigMode (833.49s)
    ```
    bflad committed Apr 6, 2019
    Configuration menu
    Copy the full SHA
    468536d View commit details
    Browse the repository at this point in the history