Skip to content

S28 3940: Search for Edit Requests and Recording Versions #1068

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lucas-phillips28
Copy link
Contributor

JIRA ticket(s)

Change description

  • Add search endpoint for edit requests
  • Add search param for recordings endpoint for version number

Copy link
Contributor

hmcts-jenkins-cnp bot commented Jun 2, 2025

Plan Result (stg)

⚠️ Resource Deletion will happen

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

Plan: 4 to add, 1 to change, 1 to destroy.
  • Create
    • azurerm_api_management_api_diagnostic.api_mgmt_logs
    • module.pre-api-mgmt-api-policy[0].azurerm_api_management_api_policy.api_policy
    • module.pre_api[0].azurerm_api_management_product_api.link_to_product[0]
  • Update
    • module.pre-api-exception-alert[0].azurerm_resource_group_template_deployment.custom_alert[0]
  • Replace
    • module.pre_api[0].azurerm_api_management_api.api
Change Result (Click me)
  # azurerm_api_management_api_diagnostic.api_mgmt_logs will be created
  + resource "azurerm_api_management_api_diagnostic" "api_mgmt_logs" {
      + always_log_errors         = true
      + api_management_logger_id  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/ss-stg-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-stg/loggers/sds-api-mgmt-stg-logger"
      + api_management_name       = "sds-api-mgmt-stg"
      + api_name                  = "pre-api"
      + http_correlation_protocol = "W3C"
      + id                        = (known after apply)
      + identifier                = "applicationinsights"
      + log_client_ip             = true
      + operation_name_format     = "Name"
      + resource_group_name       = "ss-stg-network-rg"
      + sampling_percentage       = 100
      + verbosity                 = "verbose"

      + backend_request {
          + body_bytes     = 8192
          + headers_to_log = [
              + "X-User-Id",
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + backend_response {
          + body_bytes     = 8192
          + headers_to_log = [
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + frontend_request {
          + body_bytes     = 8192
          + headers_to_log = [
              + "X-User-Id",
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + frontend_response {
          + body_bytes     = 8192
          + headers_to_log = [
              + "accept",
              + "content-type",
              + "origin",
            ]
        }
    }

  # 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-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"
      + id                  = (known after apply)
      + resource_group_name = "ss-stg-network-rg"
      + xml_content         = <<-EOT
            <policies>
                <inbound>
                    <base />
                    <set-backend-service base-url="https://pre-api.staging.platform.hmcts.net" />
                    <cors allow-credentials="false">
                        <allowed-origins>
                            <origin>*</origin>
                        </allowed-origins>
                        <allowed-methods>
                            <method>*</method>
                        </allowed-methods>
                        <allowed-headers>
                            <header>*</header>
                        </allowed-headers>
                    </cors>
                </inbound>
                <backend>
                    <base />
                </backend>
                <outbound>
                    <base />
                </outbound>
                <on-error>
                    <base />
                </on-error>
            </policies>
        EOT
    }

  # 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=98" -> (known after apply)
      ~ is_current            = true -> (known after apply)
      ~ is_online             = false -> (known after apply)
        name                  = "pre-api"
      ~ revision              = "98" -> "99" # 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[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"
      + id                  = (known after apply)
      + product_id          = "pre-api"
      + resource_group_name = "ss-stg-network-rg"
    }

Plan: 4 to add, 1 to change, 1 to destroy.

Copy link
Contributor

hmcts-jenkins-cnp bot commented Jun 2, 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, 1 to destroy.
  • Create
    • azurerm_api_management_api_diagnostic.api_mgmt_logs
    • module.pre-api-mgmt-api-policy[0].azurerm_api_management_api_policy.api_policy
    • module.pre_api[0].azurerm_api_management_product_api.link_to_product[0]
  • 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]
  • Replace
    • module.pre_api[0].azurerm_api_management_api.api
Change Result (Click me)
  # azurerm_api_management_api_diagnostic.api_mgmt_logs will be created
  + resource "azurerm_api_management_api_diagnostic" "api_mgmt_logs" {
      + always_log_errors         = true
      + api_management_logger_id  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/ss-prod-network-rg/providers/Microsoft.ApiManagement/service/sds-api-mgmt-prod/loggers/sds-api-mgmt-prod-logger"
      + api_management_name       = "sds-api-mgmt-prod"
      + api_name                  = "pre-api"
      + http_correlation_protocol = "W3C"
      + id                        = (known after apply)
      + identifier                = "applicationinsights"
      + log_client_ip             = true
      + operation_name_format     = "Name"
      + resource_group_name       = "ss-prod-network-rg"
      + sampling_percentage       = 100
      + verbosity                 = "verbose"

      + backend_request {
          + body_bytes     = 8192
          + headers_to_log = [
              + "X-User-Id",
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + backend_response {
          + body_bytes     = 8192
          + headers_to_log = [
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + frontend_request {
          + body_bytes     = 8192
          + headers_to_log = [
              + "X-User-Id",
              + "accept",
              + "content-type",
              + "origin",
            ]
        }

      + frontend_response {
          + body_bytes     = 8192
          + headers_to_log = [
              + "accept",
              + "content-type",
              + "origin",
            ]
        }
    }

  # 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-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-prod"
      + api_name            = "pre-api"
      + id                  = (known after apply)
      + resource_group_name = "ss-prod-network-rg"
      + xml_content         = <<-EOT
            <policies>
                <inbound>
                    <base />
                    <set-backend-service base-url="https://pre-api.platform.hmcts.net" />
                    <cors allow-credentials="false">
                        <allowed-origins>
                            <origin>*</origin>
                        </allowed-origins>
                        <allowed-methods>
                            <method>*</method>
                        </allowed-methods>
                        <allowed-headers>
                            <header>*</header>
                        </allowed-headers>
                    </cors>
                </inbound>
                <backend>
                    <base />
                </backend>
                <outbound>
                    <base />
                </outbound>
                <on-error>
                    <base />
                </on-error>
            </policies>
        EOT
    }

  # 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=98" -> (known after apply)
      ~ is_current            = true -> (known after apply)
      ~ is_online             = false -> (known after apply)
        name                  = "pre-api"
      ~ revision              = "98" -> "99" # 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[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-prod"
      + api_name            = "pre-api"
      + id                  = (known after apply)
      + product_id          = "pre-api"
      + resource_group_name = "ss-prod-network-rg"
    }

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

lydiaralphgov
lydiaralphgov previously approved these changes Jun 6, 2025
Copy link
Contributor

@lydiaralphgov lydiaralphgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

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.

4 participants