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

[AVM Module Issue]: Setting mismatch in API version #39

Open
1 task done
BrettOdgersJewell opened this issue Mar 7, 2025 · 1 comment
Open
1 task done

[AVM Module Issue]: Setting mismatch in API version #39

BrettOdgersJewell opened this issue Mar 7, 2025 · 1 comment
Labels
Language: Terraform 🌐 This is related to the Terraform IaC language Needs: Triage 🔍 Maintainers need to triage still Type: Bug 🐛 Something isn't working

Comments

@BrettOdgersJewell
Copy link

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

2.0.0

(Optional) Correlation Id

No response

Description

When running Terraform apply we get the issue below which states that the attribute "secrets" in the deployment data is not expected. When reviewing the API version, the "Secrets" attribute is not present in the API ("Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-01-01"). However, the setting is present in the latest API version ("Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-02-15-preview"). If we comment out the "secrets" attribute in the deploymentData block we then get the second error below.


FIRST ERROR


│ Error: Invalid configuration

│ with module.hci.azapi_resource.validatedeploymentsetting,
│ on .terraform\modules\hci\validate.tf line 11, in resource "azapi_resource" "validatedeploymentsetting":
│ 11: resource "azapi_resource" "validatedeploymentsetting" {

│ embedded schema validation failed: the argument "body" is invalid:
properties.deploymentConfiguration.scaleUnits.0.deploymentData.secrets is not expected here. Do you mean properties.deploymentConfiguration.scaleUnits.0.deploymentData.storage?
│ You can try to update azapi provider to the latest version or disable the validation using the feature flag schema_validation_enabled = false within the resource block


SECOND ERROR


Error: Failed to create/update resource

│ with module.avm-res-azurestackhci-cluster.azapi_resource.validatedeploymentsetting,
│ on .terraform\modules\avm-res-azurestackhci-cluster\validate.tf line 11, in resource "azapi_resource" "validatedeploymentsetting":
│ 11: resource "azapi_resource" "validatedeploymentsetting" {

│ creating/updating Resource: (ResourceId "/subscriptions/749e7196-fb97-4a3f-bc66-f80d3863cb4e/resourceGroups/App-Dev-Ground/providers/Microsoft.AzureStackHCI/clusters/hcicluster1/deploymentSettings/default" / Api Version
│ "2024-01-01"): GET [https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/REMOVED>/operationStatuses/REMOVED>(https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmanagement.azure.com%2Fproviders%2FMicrosoft.AzureStackHCI%2Flocations%2REMOVED>FoperationStatuses%2F8REMOVED>
│ --------------------------------------------------------------------------------
│ RESPONSE 200: 200 OK
│ ERROR CODE: UpdateDeploymentSettingsDataFailed
│ --------------------------------------------------------------------------------
│ {
│ "id": "/providers/Microsoft.AzureStackHCI/locations//operationStatuses/
│ "name": "",
│ "resourceId": "/subscriptions/REMOVED>/resourceGroups//providers/Microsoft.AzureStackHCI/clusters/hcicluster1/deploymentSettings/default",
│ "status": "Failed",
│ "error": {
│ "code": "UpdateDeploymentSettingsDataFailed",
│ "message": "Deployment Settings validation failed.",
│ "details": [
│ {
│ "code": "UpdateDeploymentSettingsDataFailed",
│ "target": "/subscriptions/REMOVED>/resourceGroups//providers/Microsoft.AzureStackHCI/clusters/hcicluster1",
│ "message": "Failed to create deployment settings. \nValidation status is {Status=Error, Steps={Name=Error, Description=Error executing Request: Validate, FullStepIndex=0, StartTimeUtc=3/6/2025 4:16:05 AM, EndTimeUtc=NA, Status=Error, Exception=Exception: One or more errors occurred. at: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at Microsoft.AzureStack.Solution.Deploy.LCMController.ArcCommunication.ActionPlanController.ExecuteRequest(Request request) Base Exception: Could not make the arm call with inner error = at: at EdgeCommonClient.EdgeArmClient.MakeArmCall(HttpMethod httpMethod, String resourceId, String apiVersion, String content)\r\n at Microsoft.AzureStack.Solution.Deploy.LCMController.ArcCommunication.ECELiteConfigurationService.GetDeploymentSettings(Request message)\r\n at Microsoft.AzureStack.Solution.Deploy.LCMController.ArcCommunication.ActionPlanController.d__4.MoveNext(), Steps=}}. \nDeployment Status is {Status=, Steps=null}"
│ }
│ ]
│ }
│ }

@BrettOdgersJewell BrettOdgersJewell added Language: Terraform 🌐 This is related to the Terraform IaC language Needs: Triage 🔍 Maintainers need to triage still labels Mar 7, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Type: Bug 🐛 Something isn't working label Mar 7, 2025
@PragyaDw
Copy link

PragyaDw commented Mar 7, 2025

Ack!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language: Terraform 🌐 This is related to the Terraform IaC language Needs: Triage 🔍 Maintainers need to triage still Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants