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_arc_kubernetes_cluster_extension conflict error when both release_train and version are set #23690

Closed
1 task done
agreaves-ms opened this issue Oct 25, 2023 · 3 comments

Comments

@agreaves-ms
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.6.2

AzureRM Provider Version

3.76.0

Affected Resource(s)/Data Source(s)

azurerm_arc_kubernetes_cluster_extension

Terraform Configuration Files

resource "azurerm_arc_kubernetes_cluster_extension" "apim" {
  cluster_id       = local.cluster_id
  extension_type   = "Microsoft.ApiManagement.Gateway"
  name             = "api-arc-${var.name}"
  release_train    = "preview"
  version          = "1.6.4"
  target_namespace = "apim"

  identity {
    type = "SystemAssigned"
  }

  configuration_protected_settings = {
    "gateway.auth.token"      = var.gateway_auth_key
    "monitoring.ingestionKey" = ""
  }

  configuration_settings = {
    "service.type"                                                        = "LoadBalancer"
    "service.http.port"                                                   = "8080"
    "service.http.nodePort"                                               = ""
    "service.https.port"                                                  = "8081"
    "gateway.id"                                                          = local.gateway_id
    "gateway.configuration.uri"                                           = "api-${var.name}-002.configuration.azure-api.net"
    "gateway.configuration.backup.enabled"                                = true
    "gateway.configuration.backup.persistentVolumeClaim.storageClassName" = ""
    "telemetry.metrics.opentelemetry.enabled"                             = false
    "telemetry.metrics.opentelemetry.collector.uri"                       = ""
    "replicaCount"                                                        = "1"
    "monitoring.workspaceId"                                              = ""
    "monitoring.customResourceId"                                         = local.apim_service_id
    "highAvailability.enabled"                                            = true
    "dapr.enabled"                                                        = false
    "dapr.app.id"                                                         = ""
  }
}

Debug Output/Panic Output

╷
│ Error: Conflicting configuration arguments
│ 
│   with azurerm_arc_kubernetes_cluster_extension.apim,
│   on main.tf line 18, in resource "azurerm_arc_kubernetes_cluster_extension" "apim":
│   18:   release_train    = "preview"
│ 
│ "release_train": conflicts with version
╵
╷
│ Error: Conflicting configuration arguments
│ 
│   with azurerm_arc_kubernetes_cluster_extension.apim,
│   on main.tf line 19, in resource "azurerm_arc_kubernetes_cluster_extension" "apim":
│   19:   version          = "1.6.4"
│ 
│ "version": conflicts with release_train
╵

Expected Behaviour

It should create the extension in the following way:

  • Allow Release Train to be something other than stable, in this case, preview.
  • Pin a version, in the case, 1.6.4
  • Set Auto Upgrade Minor Version to False.

As an example, the following az cli command works in the previously described manor:

az k8s-extension create -g rg-awg-aio-tst --cluster-name arc-awg-aio-tst --cluster-type connectedClusters --extension-type Microsoft.ApiManagement.Gateway --name api-arc-awg-aio-tst --release-train preview --version 1.6.4 --auto-upgrade false --config-file arc-apim-settings.json --config-protected-file arc-apim-protected-settings.json

Which produces the following extension in the portal:

image

Actual Behaviour

The azurerm terraform provider produces a Conflict error when version and release_train are set at the same time.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@ms-zhenhua
Copy link
Contributor

Hi @agreaves-ms, thank you for reaching out.
According to this MS-DOC, releaseTrain works only when autoUpgradeMinorVersion is true and version works only when autoUpgradeMinorVersion is false. So, releaseTrain and version cannot be set simultaneously. Have you tried to only set version=1.6.4 w/o setting release_train?

@stephybun
Copy link
Member

Closed by #23692

Copy link

github-actions bot commented May 3, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants