Skip to content

S28 2057: Get Audit By Id#976

Open
lucas-phillips28 wants to merge 9 commits intoS28-3556from
S28-2057/get-audit-by-id
Open

S28 2057: Get Audit By Id#976
lucas-phillips28 wants to merge 9 commits intoS28-3556from
S28-2057/get-audit-by-id

Conversation

@lucas-phillips28
Copy link
Contributor

JIRA ticket(s)

Change description

  • Add endpoint: GET /audit/{id}

@hmcts-jenkins-cnp
Copy link
Contributor

hmcts-jenkins-cnp bot commented Feb 28, 2025

Plan Result (stg)

⚠️ Resource Deletion will happen

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 8 to add, 4 to change, 5 to destroy.
  • Create
    • azurerm_key_vault_secret.apim_subscription_editvm_primary_key[0]
    • azurerm_key_vault_secret.apim_subscription_editvm_secondary_key[0]
    • module.apim_subscription_editvm[0].azurerm_api_management_subscription.subscription
    • module.pre-api-b2c-mgmt-api-policy[0].azurerm_api_management_api_policy.api_policy
    • module.pre_api_b2c[0].azurerm_api_management_api.api
    • module.pre_api_b2c[0].azurerm_api_management_product_api.link_to_product[0]
    • module.pre_b2c_product[0].azurerm_api_management_product.product
  • Update
    • module.apim_subscription_portal[0].azurerm_api_management_subscription.subscription
    • module.apim_subscription_powerplatform[0].azurerm_api_management_subscription.subscription
    • module.apim_subscription_smoketest[0].azurerm_api_management_subscription.subscription
    • module.pre-api-exception-alert[0].azurerm_resource_group_template_deployment.custom_alert[0]
  • Delete
    • module.pre-api-b2c-mgmt-api-policy.azurerm_api_management_api_policy.api_policy
    • module.pre_api_b2c.azurerm_api_management_api.api
    • module.pre_api_b2c.azurerm_api_management_product_api.link_to_product[0]
    • module.pre_b2c_product.azurerm_api_management_product.product
  • Replace
    • module.pre_api[0].azurerm_api_management_api.api
Change Result (Click me)
  # azurerm_key_vault_secret.apim_subscription_editvm_primary_key[0] will be created
  + resource "azurerm_key_vault_secret" "apim_subscription_editvm_primary_key" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pre-stg/providers/Microsoft.KeyVault/vaults/pre-hmctskv-stg"
      + name                    = "apim-sub-editvm-primary-key"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + value_wo                = (write-only attribute)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # azurerm_key_vault_secret.apim_subscription_editvm_secondary_key[0] will be created
  + resource "azurerm_key_vault_secret" "apim_subscription_editvm_secondary_key" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pre-stg/providers/Microsoft.KeyVault/vaults/pre-hmctskv-stg"
      + name                    = "apim-sub-editvm-secondary-key"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + value_wo                = (write-only attribute)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # module.apim_subscription_editvm[0].azurerm_api_management_subscription.subscription will be created
  + resource "azurerm_api_management_subscription" "subscription" {
      + allow_tracing       = true
      + api_management_name = "sds-api-mgmt-stg"
      + display_name        = "PRE Edit VM subscription"
      + id                  = (known after apply)
      + primary_key         = (sensitive value)
      + resource_group_name = "ss-stg-network-rg"
      + secondary_key       = (sensitive value)
      + state               = "active"
      + subscription_id     = (known after apply)
    }

  # module.apim_subscription_portal[0].azurerm_api_management_subscription.subscription will be updated in-place
  ~ resource "azurerm_api_management_subscription" "subscription" {
      ~ allow_tracing       = false -> true
        id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/subscriptions/500e642d-76ef-4d82-8741-bf9e9d979705"
        # (10 unchanged attributes hidden)
    }

  # module.apim_subscription_powerplatform[0].azurerm_api_management_subscription.subscription will be updated in-place
  ~ resource "azurerm_api_management_subscription" "subscription" {
      ~ allow_tracing       = false -> true
        id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/subscriptions/37f73c17-345b-4c67-81d5-50d582e97227"
        # (10 unchanged attributes hidden)
    }

  # module.apim_subscription_smoketest[0].azurerm_api_management_subscription.subscription will be updated in-place
  ~ resource "azurerm_api_management_subscription" "subscription" {
      ~ allow_tracing       = false -> true
        id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/subscriptions/da1d82f9-7187-4cb6-a6dd-b0020311f3bb"
        # (10 unchanged attributes hidden)
    }

  # module.pre-api-b2c-mgmt-api-policy.azurerm_api_management_api_policy.api_policy will be destroyed
  # (because module.pre-api-b2c-mgmt-api-policy is not in configuration)
  - resource "azurerm_api_management_api_policy" "api_policy" {
      - api_management_name = "sds-api-mgmt-stg" -> null
      - api_name            = "pre-api-b2c" -> null
      - id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/apis/pre-api-b2c" -> null
      - resource_group_name = "ss-stg-network-rg" -> null
      - xml_content         = <<-EOT
            <policies>
            	<inbound>
            		<base />
            		<validate-jwt header-name="Authorization" require-scheme="Bearer" failed-validation-httpcode="401">
            			<openid-config url="https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0/.well-known/openid-configuration" />
            			<audiences>
            				<audience>api://1085988a-4178-41f0-b391-4d7859e42c00</audience>
            				<audience>1085988a-4178-41f0-b391-4d7859e42c00</audience>
            				<audience>api://b79aae69-ed5f-4b1b-aa59-9fbd950639b4</audience>
            				<audience>b79aae69-ed5f-4b1b-aa59-9fbd950639b4</audience>
            			</audiences>
            			<issuers>
            				<issuer>https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0</issuer>
            			</issuers>
            			<required-claims>
            				<claim name="roles" match="all">
            					<value>pre.api.request.b2c</value>
            				</claim>
            			</required-claims>
            		</validate-jwt>
            		<cors>
            			<allowed-origins>
            				<origin>*</origin>
            			</allowed-origins>
            			<allowed-methods>
            				<method>GET</method>
            				<method>POST</method>
            			</allowed-methods>
            		</cors>
            	</inbound>
            	<backend>
            		<base />
            	</backend>
            	<outbound>
            		<base />
            	</outbound>
            	<on-error>
            		<base />
            	</on-error>
            </policies>
        EOT -> null
    }

  # module.pre-api-b2c-mgmt-api-policy[0].azurerm_api_management_api_policy.api_policy will be created
  + resource "azurerm_api_management_api_policy" "api_policy" {
      + api_management_name = "sds-api-mgmt-stg"
      + api_name            = "pre-api-b2c"
      + id                  = (known after apply)
      + resource_group_name = "ss-stg-network-rg"
      + xml_content         = <<-EOT
            <policies>
              <inbound>
                <base />
                <validate-jwt header-name="Authorization" require-scheme="Bearer" failed-validation-httpcode="401">
                  <openid-config url="https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0/.well-known/openid-configuration" />
                  <audiences>
                    <audience>api://b79aae69-ed5f-4b1b-aa59-9fbd950639b4</audience>
                    <audience>b79aae69-ed5f-4b1b-aa59-9fbd950639b4</audience>
                  </audiences>
                  <issuers>
                    <issuer>https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0</issuer>
                  </issuers>
                  <required-claims>
                    <claim name="roles" match="all">
                      <value>pre.api.request.b2c</value>
                    </claim>
                  </required-claims>
                </validate-jwt>
                <cors>
                  <allowed-origins>
                    <origin>*</origin>
                  </allowed-origins>
                  <allowed-methods>
                    <method>GET</method>
                    <method>POST</method>
                  </allowed-methods>
                </cors>
              </inbound>
              <backend><base /></backend>
              <outbound><base /></outbound>
              <on-error><base /></on-error>
            </policies>
        EOT
    }

  # module.pre-api-exception-alert[0].azurerm_resource_group_template_deployment.custom_alert[0] will be updated in-place
  ~ resource "azurerm_resource_group_template_deployment" "custom_alert" {
        id                       = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pre-stg/providers/Microsoft.Resources/deployments/PRE_API_exception"
        name                     = "PRE_API_exception"
        tags                     = {}
      ~ template_content         = jsonencode(
          ~ {
              ~ parameters     = {
                  ~ actionGroupName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ actionGroupRg            = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertDesc                = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertName                = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsQuery         = {
                      ~ type = "String" -> "string"
                    }
                  ~ commonTags               = {
                      ~ type = "String" -> "string"
                    }
                  ~ customEmailSubject       = {
                      ~ type = "String" -> "string"
                    }
                  ~ frequencyInMinutes       = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ location                 = {
                      ~ type = "String" -> "string"
                    }
                  ~ severityLevel            = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ timeWindowInMinutes      = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ triggerThreshold         = {
                      ~ type = "String" -> "string"
                    }
                  ~ triggerThresholdOperator = {
                      ~ type          = "String" -> "string"
                        # (2 unchanged attributes hidden)
                    }
                }
                # (4 unchanged attributes hidden)
            }
        )
        # (6 unchanged attributes hidden)
    }

  # module.pre_api[0].azurerm_api_management_api.api must be replaced
-/+ resource "azurerm_api_management_api" "api" {
      ~ id                    = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/apis/pre-api;rev=137" -> (known after apply)
      ~ is_current            = true -> (known after apply)
      ~ is_online             = false -> (known after apply)
        name                  = "pre-api"
      ~ revision              = "137" -> "127" # forces replacement
      + version               = (known after apply)
      + version_set_id        = (known after apply)
        # (12 unchanged attributes hidden)

      ~ subscription_key_parameter_names (known after apply)
      - subscription_key_parameter_names {
          - header = "Ocp-Apim-Subscription-Key" -> null
          - query  = "subscription-key" -> null
        }

        # (1 unchanged block hidden)
    }

  # module.pre_api_b2c.azurerm_api_management_api.api will be destroyed
  # (because module.pre_api_b2c is not in configuration)
  - resource "azurerm_api_management_api" "api" {
      - api_management_name   = "sds-api-mgmt-stg" -> null
      - api_type              = "http" -> null
      - display_name          = "Pre Recorded Evidence API B2C" -> null
      - id                    = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/apis/pre-api-b2c;rev=137" -> null
      - is_current            = true -> null
      - is_online             = false -> null
      - name                  = "pre-api-b2c" -> null
      - path                  = "pre-api-b2c" -> null
      - protocols             = [
          - "http",
          - "https",
        ] -> null
      - resource_group_name   = "ss-stg-network-rg" -> null
      - revision              = "137" -> null
      - service_url           = "https://pre-api.staging.platform.hmcts.net" -> null
      - subscription_required = false -> null
        # (6 unchanged attributes hidden)

      - import {
          - content_format = "openapi+json-link" -> null
          - content_value  = "https://raw.githubusercontent.com/hmcts/cnp-api-docs/master/docs/specs/pre-api-b2c.json" -> null
        }

      - subscription_key_parameter_names {
          - header = "Ocp-Apim-Subscription-Key" -> null
          - query  = "subscription-key" -> null
        }
    }

  # module.pre_api_b2c.azurerm_api_management_product_api.link_to_product[0] will be destroyed
  # (because module.pre_api_b2c is not in configuration)
  - resource "azurerm_api_management_product_api" "link_to_product" {
      - api_management_name = "sds-api-mgmt-stg" -> null
      - api_name            = "pre-api-b2c" -> null
      - id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/products/pre-api-b2c/apis/pre-api-b2c" -> null
      - product_id          = "pre-api-b2c" -> null
      - resource_group_name = "ss-stg-network-rg" -> null
    }

  # module.pre_api_b2c[0].azurerm_api_management_api.api will be created
  + resource "azurerm_api_management_api" "api" {
      + api_management_name   = "sds-api-mgmt-stg"
      + api_type              = "http"
      + display_name          = "Pre Recorded Evidence API B2C"
      + id                    = (known after apply)
      + is_current            = (known after apply)
      + is_online             = (known after apply)
      + name                  = "pre-api-b2c"
      + path                  = "pre-api-b2c"
      + protocols             = [
          + "http",
          + "https",
        ]
      + resource_group_name   = "ss-stg-network-rg"
      + revision              = "127"
      + service_url           = "https://pre-api.staging.platform.hmcts.net"
      + subscription_required = false
      + version               = (known after apply)
      + version_set_id        = (known after apply)

      + import {
          + content_format = "openapi+json-link"
          + content_value  = "https://raw.githubusercontent.com/hmcts/cnp-api-docs/master/docs/specs/pre-api-b2c.json"
        }

      + subscription_key_parameter_names (known after apply)
    }

  # module.pre_api_b2c[0].azurerm_api_management_product_api.link_to_product[0] will be created
  + resource "azurerm_api_management_product_api" "link_to_product" {
      + api_management_name = "sds-api-mgmt-stg"
      + api_name            = "pre-api-b2c"
      + id                  = (known after apply)
      + product_id          = "pre-api-b2c"
      + resource_group_name = "ss-stg-network-rg"
    }

  # module.pre_b2c_product.azurerm_api_management_product.product will be destroyed
  # (because module.pre_b2c_product is not in configuration)
  - resource "azurerm_api_management_product" "product" {
      - api_management_name   = "sds-api-mgmt-stg" -> null
      - approval_required     = false -> null
      - display_name          = "pre-api-b2c" -> null
      - id                    = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/products/pre-api-b2c" -> null
      - product_id            = "pre-api-b2c" -> null
      - published             = true -> null
      - resource_group_name   = "ss-stg-network-rg" -> null
      - subscription_required = false -> null
      - subscriptions_limit   = 0 -> null
        # (2 unchanged attributes hidden)
    }

  # module.pre_b2c_product[0].azurerm_api_management_product.product will be created
  + resource "azurerm_api_management_product" "product" {
      + api_management_name   = "sds-api-mgmt-stg"
      + approval_required     = false
      + display_name          = "pre-api-b2c"
      + id                    = (known after apply)
      + product_id            = "pre-api-b2c"
      + published             = true
      + resource_group_name   = "ss-stg-network-rg"
      + subscription_required = false
      + subscriptions_limit   = 20
    }

Plan: 8 to add, 4 to change, 5 to destroy.

@hmcts-jenkins-cnp
Copy link
Contributor

hmcts-jenkins-cnp bot commented Feb 28, 2025

Plan Result (prod)

⚠️ Resource Deletion will happen

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 4 to add, 2 to change, 5 to destroy.
  • Create
    • azurerm_key_vault_secret.apim_subscription_editvm_primary_key[0]
    • azurerm_key_vault_secret.apim_subscription_editvm_secondary_key[0]
    • module.apim_subscription_editvm[0].azurerm_api_management_subscription.subscription
  • Update
    • module.pre-api-exception-alert[0].azurerm_resource_group_template_deployment.custom_alert[0]
    • module.pre-api-liveness-alert[0].azurerm_resource_group_template_deployment.custom_alert[0]
  • Delete
    • module.pre-api-b2c-mgmt-api-policy.azurerm_api_management_api_policy.api_policy
    • module.pre_api_b2c.azurerm_api_management_api.api
    • module.pre_api_b2c.azurerm_api_management_product_api.link_to_product[0]
    • module.pre_b2c_product.azurerm_api_management_product.product
  • Replace
    • module.pre_api[0].azurerm_api_management_api.api
Change Result (Click me)
  # azurerm_key_vault_secret.apim_subscription_editvm_primary_key[0] will be created
  + resource "azurerm_key_vault_secret" "apim_subscription_editvm_primary_key" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/pre-prod/providers/Microsoft.KeyVault/vaults/pre-hmctskv-prod"
      + name                    = "apim-sub-editvm-primary-key"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + value_wo                = (write-only attribute)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # azurerm_key_vault_secret.apim_subscription_editvm_secondary_key[0] will be created
  + resource "azurerm_key_vault_secret" "apim_subscription_editvm_secondary_key" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/pre-prod/providers/Microsoft.KeyVault/vaults/pre-hmctskv-prod"
      + name                    = "apim-sub-editvm-secondary-key"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + value_wo                = (write-only attribute)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # module.apim_subscription_editvm[0].azurerm_api_management_subscription.subscription will be created
  + resource "azurerm_api_management_subscription" "subscription" {
      + allow_tracing       = false
      + api_management_name = "sds-api-mgmt-prod"
      + display_name        = "PRE Edit VM subscription"
      + id                  = (known after apply)
      + primary_key         = (sensitive value)
      + resource_group_name = "ss-prod-network-rg"
      + secondary_key       = (sensitive value)
      + state               = "active"
      + subscription_id     = (known after apply)
    }

  # module.pre-api-b2c-mgmt-api-policy.azurerm_api_management_api_policy.api_policy will be destroyed
  # (because module.pre-api-b2c-mgmt-api-policy is not in configuration)
  - resource "azurerm_api_management_api_policy" "api_policy" {
      - api_management_name = "sds-api-mgmt-prod" -> null
      - api_name            = "pre-api-b2c" -> null
      - id                  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/apis/pre-api-b2c" -> null
      - resource_group_name = "ss-prod-network-rg" -> null
      - xml_content         = <<-EOT
            <policies>
            	<inbound>
            		<base />
            		<validate-jwt header-name="Authorization" require-scheme="Bearer" failed-validation-httpcode="401">
            			<openid-config url="https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0/.well-known/openid-configuration" />
            			<audiences>
            				<audience>api://20e4611e-8b97-4157-a335-4bb9b7e905b1</audience>
            				<audience>20e4611e-8b97-4157-a335-4bb9b7e905b1</audience>
            				<audience>api://20e4611e-8b97-4157-a335-4bb9b7e905b1</audience>
            				<audience>20e4611e-8b97-4157-a335-4bb9b7e905b1</audience>
            			</audiences>
            			<issuers>
            				<issuer>https://login.microsoftonline.com/531ff96d-0ae9-462a-8d2d-bec7c0b42082/v2.0</issuer>
            			</issuers>
            			<required-claims>
            				<claim name="roles" match="all">
            					<value>pre.api.request.b2c</value>
            				</claim>
            			</required-claims>
            		</validate-jwt>
            		<cors>
            			<allowed-origins>
            				<origin>*</origin>
            			</allowed-origins>
            			<allowed-methods>
            				<method>GET</method>
            				<method>POST</method>
            			</allowed-methods>
            		</cors>
            	</inbound>
            	<backend>
            		<base />
            	</backend>
            	<outbound>
            		<base />
            	</outbound>
            	<on-error>
            		<base />
            	</on-error>
            </policies>
        EOT -> null
    }

  # module.pre-api-exception-alert[0].azurerm_resource_group_template_deployment.custom_alert[0] will be updated in-place
  ~ resource "azurerm_resource_group_template_deployment" "custom_alert" {
        id                       = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/pre-prod/providers/Microsoft.Resources/deployments/PRE_API_exception"
        name                     = "PRE_API_exception"
        tags                     = {}
      ~ template_content         = jsonencode(
          ~ {
              ~ parameters     = {
                  ~ actionGroupName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ actionGroupRg            = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertDesc                = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertName                = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsQuery         = {
                      ~ type = "String" -> "string"
                    }
                  ~ commonTags               = {
                      ~ type = "String" -> "string"
                    }
                  ~ customEmailSubject       = {
                      ~ type = "String" -> "string"
                    }
                  ~ frequencyInMinutes       = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ location                 = {
                      ~ type = "String" -> "string"
                    }
                  ~ severityLevel            = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ timeWindowInMinutes      = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ triggerThreshold         = {
                      ~ type = "String" -> "string"
                    }
                  ~ triggerThresholdOperator = {
                      ~ type          = "String" -> "string"
                        # (2 unchanged attributes hidden)
                    }
                }
                # (4 unchanged attributes hidden)
            }
        )
        # (6 unchanged attributes hidden)
    }

  # module.pre-api-liveness-alert[0].azurerm_resource_group_template_deployment.custom_alert[0] will be updated in-place
  ~ resource "azurerm_resource_group_template_deployment" "custom_alert" {
        id                       = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/pre-prod/providers/Microsoft.Resources/deployments/PRE_API_liveness"
        name                     = "PRE_API_liveness"
        tags                     = {}
      ~ template_content         = jsonencode(
          ~ {
              ~ parameters     = {
                  ~ actionGroupName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ actionGroupRg            = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertDesc                = {
                      ~ type = "String" -> "string"
                    }
                  ~ alertName                = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsName          = {
                      ~ type = "String" -> "string"
                    }
                  ~ appInsightsQuery         = {
                      ~ type = "String" -> "string"
                    }
                  ~ commonTags               = {
                      ~ type = "String" -> "string"
                    }
                  ~ customEmailSubject       = {
                      ~ type = "String" -> "string"
                    }
                  ~ frequencyInMinutes       = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ location                 = {
                      ~ type = "String" -> "string"
                    }
                  ~ severityLevel            = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ timeWindowInMinutes      = {
                      ~ type         = "String" -> "string"
                        # (1 unchanged attribute hidden)
                    }
                  ~ triggerThreshold         = {
                      ~ type = "String" -> "string"
                    }
                  ~ triggerThresholdOperator = {
                      ~ type          = "String" -> "string"
                        # (2 unchanged attributes hidden)
                    }
                }
                # (4 unchanged attributes hidden)
            }
        )
        # (6 unchanged attributes hidden)
    }

  # module.pre_api[0].azurerm_api_management_api.api must be replaced
-/+ resource "azurerm_api_management_api" "api" {
      ~ id                    = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/apis/pre-api;rev=137" -> (known after apply)
      ~ is_current            = true -> (known after apply)
      ~ is_online             = false -> (known after apply)
        name                  = "pre-api"
      ~ revision              = "137" -> "127" # forces replacement
      + version               = (known after apply)
      + version_set_id        = (known after apply)
        # (12 unchanged attributes hidden)

      ~ subscription_key_parameter_names (known after apply)
      - subscription_key_parameter_names {
          - header = "Ocp-Apim-Subscription-Key" -> null
          - query  = "subscription-key" -> null
        }

        # (1 unchanged block hidden)
    }

  # module.pre_api_b2c.azurerm_api_management_api.api will be destroyed
  # (because module.pre_api_b2c is not in configuration)
  - resource "azurerm_api_management_api" "api" {
      - api_management_name   = "sds-api-mgmt-prod" -> null
      - api_type              = "http" -> null
      - display_name          = "Pre Recorded Evidence API B2C" -> null
      - id                    = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/apis/pre-api-b2c;rev=137" -> null
      - is_current            = true -> null
      - is_online             = false -> null
      - name                  = "pre-api-b2c" -> null
      - path                  = "pre-api-b2c" -> null
      - protocols             = [
          - "http",
          - "https",
        ] -> null
      - resource_group_name   = "ss-prod-network-rg" -> null
      - revision              = "137" -> null
      - service_url           = "https://pre-api.platform.hmcts.net" -> null
      - subscription_required = false -> null
        # (6 unchanged attributes hidden)

      - import {
          - content_format = "openapi+json-link" -> null
          - content_value  = "https://raw.githubusercontent.com/hmcts/cnp-api-docs/master/docs/specs/pre-api-b2c.json" -> null
        }

      - subscription_key_parameter_names {
          - header = "Ocp-Apim-Subscription-Key" -> null
          - query  = "subscription-key" -> null
        }
    }

  # module.pre_api_b2c.azurerm_api_management_product_api.link_to_product[0] will be destroyed
  # (because module.pre_api_b2c is not in configuration)
  - resource "azurerm_api_management_product_api" "link_to_product" {
      - api_management_name = "sds-api-mgmt-prod" -> null
      - api_name            = "pre-api-b2c" -> null
      - id                  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/products/pre-api-b2c/apis/pre-api-b2c" -> null
      - product_id          = "pre-api-b2c" -> null
      - resource_group_name = "ss-prod-network-rg" -> null
    }

  # module.pre_b2c_product.azurerm_api_management_product.product will be destroyed
  # (because module.pre_b2c_product is not in configuration)
  - resource "azurerm_api_management_product" "product" {
      - api_management_name   = "sds-api-mgmt-prod" -> null
      - approval_required     = false -> null
      - display_name          = "pre-api-b2c" -> null
      - id                    = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/products/pre-api-b2c" -> null
      - product_id            = "pre-api-b2c" -> null
      - published             = true -> null
      - resource_group_name   = "ss-prod-network-rg" -> null
      - subscription_required = false -> null
      - subscriptions_limit   = 0 -> null
        # (2 unchanged attributes hidden)
    }

Plan: 4 to add, 2 to change, 5 to destroy.

Base automatically changed from S28-2059/search-audits to S28-3556 August 4, 2025 09:10
@lydiaralphgov
Copy link
Contributor

Awaiting sign off from Jacob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants