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

azurerm_load_test - fix test failure of TestAccLoadTest_update #27800

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading