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_fsx_windows_file_system: Prevent panic when update includes self_managed_active_directory settings #12630

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 2, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11500

Release note for CHANGELOG:

* resource/aws_fsx_windows_file_system: Prevent panic when update includes `self_managed_active_directory` settings

Previously:

=== CONT  TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username
panic: interface conversion: interface {} is *schema.Set, not []interface {}

goroutine 4434 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.expandFsxSelfManagedActiveDirectoryConfigurationUpdate(0xc000488de0, 0x1, 0x1, 0x5b2f000)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:413 +0x2d7
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsFsxWindowsFileSystemUpdate(0xc00004ed20, 0x62e3060, 0xc0003c3900, 0x0, 0x0)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:269 +0x637
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc00099b580, 0xc001cf2cd0, 0xc000ddebe0, 0x62e3060, 0xc0003c3900, 0x6168e01, 0xc001e73760, 0xc001914db0)
	/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:311 +0x263

Output from acceptance testing:

--- PASS: TestAccAWSFsxWindowsFileSystem_AutomaticBackupRetentionDays (3063.70s)
--- PASS: TestAccAWSFsxWindowsFileSystem_basic (2915.15s)
--- PASS: TestAccAWSFsxWindowsFileSystem_CopyTagsToBackups (4140.35s)
--- PASS: TestAccAWSFsxWindowsFileSystem_DailyAutomaticBackupStartTime (3034.18s)
--- PASS: TestAccAWSFsxWindowsFileSystem_disappears (3045.25s)
--- PASS: TestAccAWSFsxWindowsFileSystem_KmsKeyId (4148.71s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SecurityGroupIds (4179.82s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory (2905.75s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username (3731.46s)
--- PASS: TestAccAWSFsxWindowsFileSystem_StorageCapacity (4120.68s)
--- PASS: TestAccAWSFsxWindowsFileSystem_Tags (2968.90s)
--- PASS: TestAccAWSFsxWindowsFileSystem_ThroughputCapacity (4056.94s)
--- PASS: TestAccAWSFsxWindowsFileSystem_WeeklyMaintenanceStartTime (3012.74s)

…des `self_managed_active_directory` settings

Reference: #11500

Previously:

```
=== CONT  TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username
panic: interface conversion: interface {} is *schema.Set, not []interface {}

goroutine 4434 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.expandFsxSelfManagedActiveDirectoryConfigurationUpdate(0xc000488de0, 0x1, 0x1, 0x5b2f000)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:413 +0x2d7
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsFsxWindowsFileSystemUpdate(0xc00004ed20, 0x62e3060, 0xc0003c3900, 0x0, 0x0)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:269 +0x637
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc00099b580, 0xc001cf2cd0, 0xc000ddebe0, 0x62e3060, 0xc0003c3900, 0x6168e01, 0xc001e73760, 0xc001914db0)
	/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:311 +0x263
```

Output from acceptance testing:

```
--- PASS: TestAccAWSFsxWindowsFileSystem_AutomaticBackupRetentionDays (3063.70s)
--- PASS: TestAccAWSFsxWindowsFileSystem_basic (2915.15s)
--- PASS: TestAccAWSFsxWindowsFileSystem_CopyTagsToBackups (4140.35s)
--- PASS: TestAccAWSFsxWindowsFileSystem_DailyAutomaticBackupStartTime (3034.18s)
--- PASS: TestAccAWSFsxWindowsFileSystem_disappears (3045.25s)
--- PASS: TestAccAWSFsxWindowsFileSystem_KmsKeyId (4148.71s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SecurityGroupIds (4179.82s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory (2905.75s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username (3731.46s)
--- PASS: TestAccAWSFsxWindowsFileSystem_StorageCapacity (4120.68s)
--- PASS: TestAccAWSFsxWindowsFileSystem_Tags (2968.90s)
--- PASS: TestAccAWSFsxWindowsFileSystem_ThroughputCapacity (4056.94s)
--- PASS: TestAccAWSFsxWindowsFileSystem_WeeklyMaintenanceStartTime (3012.74s)
```
@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Apr 2, 2020
@bflad bflad requested a review from a team April 2, 2020 14:05
@ghost ghost added size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/fsx Issues and PRs that pertain to the fsx service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 2, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Apr 2, 2020
Copy link
Member

@breathingdust breathingdust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@bflad bflad added this to the v2.60.0 milestone Apr 28, 2020
@bflad bflad merged commit a8973be into master Apr 28, 2020
@bflad bflad deleted the b-aws_fsx_windows_file_system-smad-panic branch April 28, 2020 20:03
bflad added a commit that referenced this pull request Apr 28, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory (2923.61s)
--- PASS: TestAccAWSFsxWindowsFileSystem_WeeklyMaintenanceStartTime (2924.04s)
--- PASS: TestAccAWSFsxWindowsFileSystem_AutomaticBackupRetentionDays (2995.92s)
--- PASS: TestAccAWSFsxWindowsFileSystem_basic (3064.37s)
--- PASS: TestAccAWSFsxWindowsFileSystem_Tags (3110.85s)
--- PASS: TestAccAWSFsxWindowsFileSystem_disappears (3118.80s)
--- PASS: TestAccAWSFsxWindowsFileSystem_DailyAutomaticBackupStartTime (3287.39s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username (3862.73s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SecurityGroupIds (3950.15s)
--- PASS: TestAccAWSFsxWindowsFileSystem_CopyTagsToBackups (4090.75s)
--- PASS: TestAccAWSFsxWindowsFileSystem_KmsKeyId (4133.61s)
--- PASS: TestAccAWSFsxWindowsFileSystem_ThroughputCapacity (4145.37s)
--- PASS: TestAccAWSFsxWindowsFileSystem_StorageCapacity (4496.20s)

@ghost
Copy link

ghost commented May 1, 2020

This has been released in version 2.60.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

adamdecaf pushed a commit to adamdecaf/terraform-provider-aws that referenced this pull request May 28, 2020
…des `self_managed_active_directory` settings (hashicorp#12630)

Reference: hashicorp#11500

Previously:

```
=== CONT  TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username
panic: interface conversion: interface {} is *schema.Set, not []interface {}

goroutine 4434 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.expandFsxSelfManagedActiveDirectoryConfigurationUpdate(0xc000488de0, 0x1, 0x1, 0x5b2f000)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:413 +0x2d7
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsFsxWindowsFileSystemUpdate(0xc00004ed20, 0x62e3060, 0xc0003c3900, 0x0, 0x0)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_fsx_windows_file_system.go:269 +0x637
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc00099b580, 0xc001cf2cd0, 0xc000ddebe0, 0x62e3060, 0xc0003c3900, 0x6168e01, 0xc001e73760, 0xc001914db0)
	/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:311 +0x263
```

Output from acceptance testing:

```
--- PASS: TestAccAWSFsxWindowsFileSystem_AutomaticBackupRetentionDays (3063.70s)
--- PASS: TestAccAWSFsxWindowsFileSystem_basic (2915.15s)
--- PASS: TestAccAWSFsxWindowsFileSystem_CopyTagsToBackups (4140.35s)
--- PASS: TestAccAWSFsxWindowsFileSystem_DailyAutomaticBackupStartTime (3034.18s)
--- PASS: TestAccAWSFsxWindowsFileSystem_disappears (3045.25s)
--- PASS: TestAccAWSFsxWindowsFileSystem_KmsKeyId (4148.71s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SecurityGroupIds (4179.82s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory (2905.75s)
--- PASS: TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username (3731.46s)
--- PASS: TestAccAWSFsxWindowsFileSystem_StorageCapacity (4120.68s)
--- PASS: TestAccAWSFsxWindowsFileSystem_Tags (2968.90s)
--- PASS: TestAccAWSFsxWindowsFileSystem_ThroughputCapacity (4056.94s)
--- PASS: TestAccAWSFsxWindowsFileSystem_WeeklyMaintenanceStartTime (3012.74s)
```
@ghost
Copy link

ghost commented May 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/fsx Issues and PRs that pertain to the fsx service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_fsx_windows_file_system Resource Crashes on Change
3 participants