Closed thekaveman closed 3 weeks ago
This PR does not seem to contain any modification to coverable code.
terraform plan
From the Azure pipeline run, none of this is really a surprise since changing some of these settings causes the whole block to be recreated:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# azurerm_app_service_source_control.main must be replaced
-/+ resource "azurerm_app_service_source_control" "main" {
~ id = "/subscriptions/xxx/resourceGroups/RG-CDT-PUB-VIP-CALITP-D-001/providers/Microsoft.Web/sites/AS-CDT-PUB-VIP-CALITP-D-001" -> (known after apply)
~ scm_type = "GitHub" -> (known after apply)
~ use_manual_integration = false -> true # forces replacement
~ uses_github_action = false -> (known after apply)
# (6 unchanged attributes hidden)
+ github_action_configuration { # forces replacement
+ generate_workflow_file = false # forces replacement
+ linux_action = (known after apply)
+ container_configuration {
+ image_name = "cal-itp/benefits" # forces replacement
+ registry_url = "https://ghcr.io/" # forces replacement
}
}
}
Plan: 1 to add, 0 to change, 1 to destroy.
I just deleted the webhook shown above, and I'm going to merge. :crossed_fingers: that the webhook is not created and this change is reflected correctly in the Azure UI.
The apply
failed, apparently these options don't work together :roll_eyes:
creating Source Control configuration for Web App: (Site Name
│ "AS-CDT-PUB-VIP-CALITP-D-001" / Resource Group
│ "RG-CDT-PUB-VIP-CALITP-D-001"): web.AppsClient#UpdateSourceControl: Failure
│ responding to request: StatusCode=400 -- Original Error: autorest/azure:
│ Service returned an error. Status=400 Code="BadRequest" Message="Operation
│ not supported: ManualIntegration does not support GitHubAction."
After deleting all of the Azure Webhooks in this git repo, we saw one show up for the
dev
app:(I disabled this webhook for working on this PR, we should delete it before merging to ensure Azure doesn't re-create).
It seems like this was created because the Azure Deployment Center settings didn't take for GitHub Actions with the old Container Registry still being selected with unsaved pending state.
Now that we know the Terraform state is aligned, this PR introduces some changes to hopefully get the UI where we want.
use_manual_integration = true
, from the default offalse
. The docs say: Set tofalse
to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults tofalse
. Changing this forces a new resource to be created.github_action_configuration
block with acontainer_configuration
block.