Skip to content

Commit

Permalink
provider/aws: Update of inspector_assessment_target should use ARN not
Browse files Browse the repository at this point in the history
Name

fixes: #12112

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSInspectorTarget_basic'                                                  ✚
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/20 19:08:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInspectorTarget_basic -timeout 120m
=== RUN   TestAccAWSInspectorTarget_basic
--- PASS: TestAccAWSInspectorTarget_basic (33.58s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	33.607s
```
  • Loading branch information
stack72 committed Feb 20, 2017
1 parent 8ea8588 commit 5ef9c15
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ func resourceAWSInspectorAssessmentTarget() *schema.Resource {
Delete: resourceAwsInspectorAssessmentTargetDelete,

Schema: map[string]*schema.Schema{
"name": &schema.Schema{
"name": {
Type: schema.TypeString,
ForceNew: true,
Required: true,
},
"arn": &schema.Schema{
"arn": {
Type: schema.TypeString,
Computed: true,
},
"resource_group_arn": &schema.Schema{
"resource_group_arn": {
Type: schema.TypeString,
Required: true,
},
Expand Down Expand Up @@ -96,7 +96,7 @@ func resourceAwsInspectorAssessmentTargetUpdate(d *schema.ResourceData, meta int

if d.HasChange("resource_group_arn") {
_, n := d.GetChange("resource_group_arn")
input.AssessmentTargetName = aws.String(n.(string))
input.ResourceGroupArn = aws.String(n.(string))
}

_, err := conn.UpdateAssessmentTarget(&input)
Expand Down

0 comments on commit 5ef9c15

Please sign in to comment.