-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_autoscaling_policy: Properly read step_adjustment into T…
…erraform state Previously, the resource was silently failing to read this attribute and therefore unable to perform drift detection or properly import the resource (currently being added). ``` --- FAIL: TestAccAWSAutoscalingPolicy_basic (85.72s) testing.go:538: Step 2 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected. (map[string]string) { } (map[string]string) (len=4) { (string) (len=17) "step_adjustment.#": (string) (len=1) "1", (string) (len=54) "step_adjustment.2042107634.metric_interval_lower_bound": (string) (len=1) "2", (string) (len=54) "step_adjustment.2042107634.metric_interval_upper_bound": (string) "", (string) (len=45) "step_adjustment.2042107634.scaling_adjustment": (string) (len=1) "1" } ``` Returning the error from `d.Set()`: ``` --- FAIL: TestAccAWSAutoscalingPolicy_basic (14.03s) testing.go:538: Step 0 error: Error applying: 1 error occurred: * aws_autoscaling_policy.foobar_step: 1 error occurred: * aws_autoscaling_policy.foobar_step: error setting step_adjustment: step_adjustment.0.metric_interval_lower_bound: '' expected type 'string', got unconvertible type 'float64' ``` Output from acceptance testing after adjustments: ``` --- PASS: TestAccAWSAutoscalingPolicy_zerovalue (44.61s) --- PASS: TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment (46.60s) --- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Predefined (48.75s) --- PASS: TestAccAWSAutoscalingPolicy_disappears (72.73s) --- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Custom (74.47s) --- PASS: TestAccAWSAutoscalingPolicy_upgrade (76.43s) --- PASS: TestAccAWSAutoscalingPolicy_basic (82.25s) ```
- Loading branch information
Showing
4 changed files
with
56 additions
and
10 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
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