08/23/2022, 7:37 PM
Trying to use the GitHub Provider in TS to create a Repository environment and some secrets, but I see consistent failures like.. "stderr: error: PUT <;your%20org&gt;/accounts/environments/development%7C;your org>/accounts/environments/development>: 422 Fail to create protected rule, please ensure billing plan include protected branch gate. []" I tried with an access token with all assigned scopes and received the same results. The Environment as well a a subset of my desired secrets is created successfully. I am able to manually change the branch rules for the environment. Can I get some assistance or pointed to the implementation so I can potentially fix?


08/23/2022, 7:40 PM
@thousands-psychiatrist-31710 looks to be a problem on the github side?


08/23/2022, 7:43 PM
Potentially, was trying to narrow it down myself and determine what endpoints were ultimately being called by Pulumi to repro on my end.
Seems like github provider is using Terraform under the hood, found this relevant issue. It proposes manually setting the branch protection rules and importing state, the Pulumi analog of refresh is not detecting the update branch protection rules leading to apply to still try and set them resulting in the 422.