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

Bug: Github - Failed to create the environment protection rule. #193

Open
1 task done
richardf5 opened this issue Sep 24, 2024 · 2 comments
Open
1 task done

Bug: Github - Failed to create the environment protection rule. #193

richardf5 opened this issue Sep 24, 2024 · 2 comments
Assignees
Labels
Status: Long Term ⌛ We will do it, but will take a longer amount of time due to complexity/priorities Type: Bug 🪲 Something isn't working

Comments

@richardf5
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Infrastrcuture as Code Type? (Required)

terraform

Module Versions (Required)

ALZ PowerShell Module: x3.0.4
Accelerator Bootstrap Modules: 3.1.2
Terraform Starter Modules: 2.3.2

Input arguments of the ALZ-PowerShell-Module (Optional)

Deploy-Accelerator -targetDirectory .\AlzTerraformAccelerator -inputs 'C:\Landing Zone Accelerators\inputsHubSpoke.yaml'

Basically, GitHub, Terraform and new standard parameters.

Debug Output/Panic Output (Optional)

First error
-----------
 Error: PUT https://api.github.com/repos/<GitHubOrg>/neon-shared/environments/neon-shared-apply: 422 Failed to create the environment protection rule. Please ensure the billing plan supports the required reviewers protection rule. []
│
│   with module.github.github_repository_environment.alz["apply"],
│   on ..\..\modules\github\environment.tf line 1, in resource "github_repository_environment" "alz":
│    1: resource "github_repository_environment" "alz" {

Additional error found in trace
-------------------------------

╵
╷
│ Error: Failed to perform action
│
│   with module.azure.azapi_resource_action.resource_provider_registration["a72c3bcf-21e8-4c35-9036-ec04f1643857_Microsoft.TimeSeriesInsights"],
│   on ..\..\modules\azure\resource_providers.tf line 17, in resource "azapi_resource_action" "resource_provider_registration":
│   17: resource "azapi_resource_action" "resource_provider_registration" {
│
│ performing action providers/Microsoft.TimeSeriesInsights/register of "Resource: (ResourceId
\"/subscriptions/<SubscriptionID>\" / Api Version \"2021-04-01\")": POST
│ https://management.azure.com/subscriptions/<SubscriptionID>/providers/Microsoft.TimeSeriesInsights/register
│ --------------------------------------------------------------------------------
│ RESPONSE 400: 400 Bad Request
│ ERROR CODE: DisallowedProvider
│ --------------------------------------------------------------------------------
│ {
│   "error": {
│     "code": "DisallowedProvider",
│     "message": "The operation is not permitted for namespace 'Microsoft.TimeSeriesInsights'.

Expected Behaviour (Required)

Bootstrap completes - especially as we're using GitHub Teams subscription.

Actual Behaviour (Required)

image

Steps to Reproduce (Optional)

No response

Important Factoids (Optional)

Using GitHub Teams Subscription - this used to work!

Also, there are still errors with regards to the change of AzureRM module - The Microsoft.TimeSeriesInsights is no longer a provider that can be registered.

References (Optional)

No response

@richardf5 richardf5 added Needs: Triage 🔍 Needs triaging by the team Type: Bug 🪲 Something isn't working labels Sep 24, 2024
@jaredfholgate
Copy link
Member

I see this feature is not supported on private repos for your plan level:
Image

See link here: https://github.com/pricing#compare-features

We only check for a free plan and not the teams plan. We probably need to reverse the logic here and / or add some notes to the docs around this: https://github.com/Azure/accelerator-bootstrap-modules/blob/72ad04bab8af6f988453dadd6b1e0e650178e837/modules/github/repository_module.tf#L5

The workaround for now would be to supply an empty array in the apply_approvers input.

@jaredfholgate jaredfholgate added Needs: Attention 👋 Needs attention from the maintainers and removed Needs: Triage 🔍 Needs triaging by the team labels Oct 10, 2024
@jaredfholgate jaredfholgate self-assigned this Oct 10, 2024
@jaredfholgate
Copy link
Member

Will have a think about the best solution to handle this, leaving open for now.

@jaredfholgate jaredfholgate added Status: Long Term ⌛ We will do it, but will take a longer amount of time due to complexity/priorities and removed Needs: Attention 👋 Needs attention from the maintainers labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Long Term ⌛ We will do it, but will take a longer amount of time due to complexity/priorities Type: Bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants