-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_launch_template: Prevent encrypted flag cannot be specif…
…ied error with block_device_mappings ebs argument * Convert `block_device_mappings` > `ebs` > `delete_on_termination` and `encrypted` to `schema.TypeString`. This to allow an "unspecified" value for the attributes since `schema.TypeBool` only has true/false with false default. The conversion from bare true/false values in configurations to `schema.TypeString` value is currently safe. Previously: ``` --- FAIL: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (11.23s) testing.go:527: Step 0 error: Error applying: 1 error occurred: * aws_autoscaling_group.test: 1 error occurred: * aws_autoscaling_group.test: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. the encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified. ``` After code adjustments: ``` make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchTemplate_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSLaunchTemplate_ -timeout 120m === RUN TestAccAWSLaunchTemplate_importBasic --- PASS: TestAccAWSLaunchTemplate_importBasic (13.63s) === RUN TestAccAWSLaunchTemplate_importData --- PASS: TestAccAWSLaunchTemplate_importData (12.00s) === RUN TestAccAWSLaunchTemplate_basic --- PASS: TestAccAWSLaunchTemplate_basic (12.71s) === RUN TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS --- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (48.73s) === RUN TestAccAWSLaunchTemplate_data --- PASS: TestAccAWSLaunchTemplate_data (13.59s) === RUN TestAccAWSLaunchTemplate_update --- PASS: TestAccAWSLaunchTemplate_update (46.88s) === RUN TestAccAWSLaunchTemplate_tags --- PASS: TestAccAWSLaunchTemplate_tags (21.37s) === RUN TestAccAWSLaunchTemplate_nonBurstable --- PASS: TestAccAWSLaunchTemplate_nonBurstable (11.47s) === RUN TestAccAWSLaunchTemplate_networkInterface --- PASS: TestAccAWSLaunchTemplate_networkInterface (30.44s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 211.533s ```
- Loading branch information
Showing
2 changed files
with
76 additions
and
21 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