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

update azapi #37

Merged
merged 6 commits into from
Feb 19, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following requirements are needed by this module:

- <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) (~> 1.5)

- <a name="requirement_azapi"></a> [azapi](#requirement\_azapi) (~> 1.14)
- <a name="requirement_azapi"></a> [azapi](#requirement\_azapi) (~> 2.0)

- <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) (~> 2.50.0)

Expand Down
2 changes: 1 addition & 1 deletion deploy.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "azapi_update_resource" "deploymentsetting" {
count = var.is_exported ? 0 : 1

type = "Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-04-01"
type = "Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-01-01"
body = {
properties = {
deploymentMode = "Deploy"
Expand Down
3 changes: 1 addition & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ locals {
overrideAdapterProperty = var.override_adapter_property,
adapterPropertyOverrides = var.rdma_enabled ? local.rdma_adapter_properties : local.adapter_properties
}]
decoded_user_storages = jsondecode(data.azapi_resource_list.user_storages.output).value
decoded_user_storages = data.azapi_resource_list.user_storages.output.value
deployment_configuration_version = var.deployment_configuration_version != null ? var.deployment_configuration_version : (var.operation_type == "ClusterUpgrade" ? "10.1.0.0" : "10.0.0.0")
deployment_data = {
securitySettings = local.security_settings
Expand Down Expand Up @@ -76,7 +76,6 @@ locals {
deployment_setting_properties = {
arcNodeResourceIds = flatten([for server in data.azurerm_arc_machine.arcservers : server.id])
deploymentMode = var.is_exported ? "Deploy" : "Validate"
operationType = var.operation_type
deploymentConfiguration = {
version = local.deployment_configuration_version
scaleUnits = [
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "azapi_resource" "arc_settings" {
}

resource "azapi_resource" "cluster" {
type = "Microsoft.AzureStackHCI/clusters@2024-04-01"
type = "Microsoft.AzureStackHCI/clusters@2024-01-01"
body = {
properties = {}
}
Expand Down
2 changes: 1 addition & 1 deletion terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azapi = {
source = "azure/azapi"
version = "~> 1.14"
version = "~> 2.0"
}
azuread = {
source = "hashicorp/azuread"
Expand Down
2 changes: 1 addition & 1 deletion validate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data "azurerm_arc_machine" "arcservers" {
}

resource "azapi_resource" "validatedeploymentsetting" {
type = "Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-04-01"
type = "Microsoft.AzureStackHCI/clusters/deploymentSettings@2024-01-01"
body = {
properties = local.deployment_setting_properties_omit_null
}
Expand Down