Skip to content

Commit

Permalink
fix acctest failure (#27800)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinbai authored Oct 29, 2024
1 parent 13bc091 commit c2bd8a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion internal/services/loadtestservice/load_test_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (r LoadTestResource) Arguments() map[string]*pluginsdk.Schema {
},
"resource_group_name": commonschema.ResourceGroupName(),
"description": {
ForceNew: true,
Optional: true,
Type: pluginsdk.TypeString,
},
Expand Down Expand Up @@ -185,6 +184,9 @@ func (r LoadTestResource) Read() sdk.ResourceFunc {
if err := r.mapLoadTestResourceToLoadTestResourceSchema(*model, &schema); err != nil {
return fmt.Errorf("flattening model: %+v", err)
}
if property := model.Properties; property != nil {
schema.Description = pointer.From(property.Description)
}
}

return metadata.Encode(&schema)
Expand Down Expand Up @@ -344,6 +346,10 @@ func (r LoadTestResource) mapLoadTestResourceSchemaToLoadTestResourceUpdate(inpu
output.Identity = identity

output.Tags = tags.Expand(input.Tags)

output.Properties = &loadtests.LoadTestResourceUpdateProperties{
Description: pointer.To(input.Description),
}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/load_test.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following arguments are supported:

* `resource_group_name` - (Required) Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.

* `description` - (Optional) Description of the resource. Changing this forces a new Load Test to be created.
* `description` - (Optional) Description of the resource.

* `identity` - (Optional) An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.

Expand Down

0 comments on commit c2bd8a0

Please sign in to comment.