From 702e98f79c1e1bde5173d9f627136cc3fd663dba Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 19 Mar 2020 03:50:08 -0400 Subject: [PATCH] resource/aws_directory_service_directory: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12083 Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12087 Previously: ``` aws/resource_aws_directory_service_directory.go:317:2: R008: deprecated (schema.ResourceData).SetPartial aws/resource_aws_directory_service_directory.go:391:3: R008: deprecated (schema.ResourceData).SetPartial ``` Output from acceptance testing (failure present on master): ``` --- PASS: TestAccAWSDirectoryServiceDirectory_basic (488.80s) --- PASS: TestAccAWSDirectoryServiceDirectory_connector (968.66s) --- PASS: TestAccAWSDirectoryServiceDirectory_microsoft (1688.96s) --- PASS: TestAccAWSDirectoryServiceDirectory_microsoftStandard (1824.96s) --- PASS: TestAccAWSDirectoryServiceDirectory_tags (623.46s) --- PASS: TestAccAWSDirectoryServiceDirectory_withAliasAndSso (584.98s) ``` --- aws/resource_aws_directory_service_directory.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aws/resource_aws_directory_service_directory.go b/aws/resource_aws_directory_service_directory.go index 75e5933c8a0..7e498a16417 100644 --- a/aws/resource_aws_directory_service_directory.go +++ b/aws/resource_aws_directory_service_directory.go @@ -314,8 +314,6 @@ func createActiveDirectoryService(dsconn *directoryservice.DirectoryService, d * } func enableDirectoryServiceSso(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) error { - d.SetPartial("enable_sso") - if v, ok := d.GetOk("enable_sso"); ok && v.(bool) { log.Printf("[DEBUG] Enabling SSO for DS directory %q", d.Id()) if _, err := dsconn.EnableSso(&directoryservice.EnableSsoInput{ @@ -388,8 +386,6 @@ func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta int } if v, ok := d.GetOk("alias"); ok { - d.SetPartial("alias") - input := directoryservice.CreateAliasInput{ DirectoryId: aws.String(d.Id()), Alias: aws.String(v.(string)),