Skip to content

Commit

Permalink
resource/aws_directory_service_directory: Remove deprecated (helper/s…
Browse files Browse the repository at this point in the history
…chema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() (hashicorp#12463)

Reference: hashicorp#12083
Reference: hashicorp#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)
```
  • Loading branch information
bflad authored and adamdecaf committed May 28, 2020
1 parent 99f052e commit 325a2a6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions aws/resource_aws_directory_service_directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 325a2a6

Please sign in to comment.