azurerm_compute_fleet - add new resource#32174
Draft
v-yhyeo0202 wants to merge 21 commits intohashicorp:mainfrom
Draft
azurerm_compute_fleet - add new resource#32174v-yhyeo0202 wants to merge 21 commits intohashicorp:mainfrom
azurerm_compute_fleet - add new resource#32174v-yhyeo0202 wants to merge 21 commits intohashicorp:mainfrom
Conversation
remove zone 2
…' into add-compute-fleet
gerrytan
suggested changes
Apr 17, 2026
| return &pluginsdk.Schema{ | ||
| Type: pluginsdk.TypeList, | ||
| Required: true, | ||
| ForceNew: true, |
Collaborator
There was a problem hiding this comment.
The max number of network interface that can be configured is 8. Let's set MaxItems: 8 here.
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking?tabs=portal1#multiple-ip-addresses-per-nic (doc is for VMSS, but applicable since fleet manages set of VMSS)
| Optional: true, | ||
| ForceNew: true, | ||
| ValidateFunc: validation.StringInSlice([]string{ | ||
| // NOTE: because there is a `None` value in the possible values, it's handled in the Create/Update and Read functions. |
Collaborator
There was a problem hiding this comment.
Remove this comment, this is a well known pattern in azurerm. Please also remove the same comments in other places.
Suggested change
| // NOTE: because there is a `None` value in the possible values, it's handled in the Create/Update and Read functions. |
|
|
||
| * `zones` - (Optional) Specifies a list of availability zones in which the Compute Fleet is available. Changing this forces a new resource to be created. | ||
|
|
||
| * `compute_api_version` - (Optional) Specifies the `Microsoft.Compute` API version to use when creating the Compute Fleet. Changing this forces a new resource to be created. |
Collaborator
There was a problem hiding this comment.
Default value should be documented
Suggested change
| * `compute_api_version` - (Optional) Specifies the `Microsoft.Compute` API version to use when creating the Compute Fleet. Changing this forces a new resource to be created. | |
| * `compute_api_version` - (Optional) Specifies the `Microsoft.Compute` API version to use when creating the Compute Fleet. Defaults to latest supported API version if not provided. Changing this forces a new resource to be created. |
| "compute_api_version": { | ||
| Type: pluginsdk.TypeString, | ||
| Optional: true, | ||
| // NOTE: O+C Azure generates a value if not specified |
Collaborator
There was a problem hiding this comment.
I agree with with this O+C and ForceNew: true design but the explanation note should be improved:
- I have tested computeProfile.computeApiVersion is non-updatable (ForceNew: true is correct)
- Creating new fleet without providing this will have default value set (Optional: true and Computed: true is correct)
- The default value (latest supported version of Microsoft.Compute API) is not documented anywhere, it will be poor user experience to make this a Required arg
| }, | ||
| }, | ||
| }, | ||
| }, |
Collaborator
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Community Note
Description
azurerm_compute_fleetresource is added. The related documentations are listed below.API: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/azurefleet/resource-manager/Microsoft.AzureFleet/stable/2024-11-01/azurefleet.json
Doc: https://learn.microsoft.com/en-us/azure/azure-compute-fleet/overview
This work is a continuation of #28758.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
(For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_compute_fleet- new resourceThis is a (please select all that apply):