terraform-provider-azapi icon indicating copy to clipboard operation
terraform-provider-azapi copied to clipboard

add example for openshift cluster deployment?

Open mzarglis opened this issue 2 years ago • 0 comments

Cannot seem to get this to work always fails about 10 minutes in with error: InternalServerError

resource "azapi_resource" "aro" {
  type      = "Microsoft.RedHatOpenShift/openShiftClusters@2020-04-30"
  name      = "testcluster"
  location  = var.location
  parent_id = var.resource_group_id
  body = jsonencode({
    properties = {

      clusterProfile = {
        domain               = var.domain
        pullSecret            = var.PULLSECRET
        resourceGroupId = azurerm_resource_group.main.id
      }
      consoleProfile = {}

      networkProfile = {
        podCidr     = var.pod_cidr
        serviceCidr = var.service_cidr
      }

      servicePrincipalProfile = {
        clientId     = var.spn_client_id
        clientSecret = var.spn_client_secret
      }

      masterProfile = {
        vmSize   = var.master_vm_size
        subnetId = var.main_subnet_id
      }

      workerProfiles = [
        {
          name       = "worker",
          vmSize     = var.worker_vm_size,
          diskSizeGB = var.diskSizeGB,
          subnetId   = var.worker_subnet_id,
          count      = var.worker_node_count
        }
      ]

      apiserverProfile = {
        visibility = "Private"
      }

      ingressProfiles = [
        {
          name       = "default"
          visibility = "Private"
        }
      ]
    }
  })

  ignore_missing_property = true
}

mzarglis avatar Sep 20 '22 06:09 mzarglis