integrations / integrations/terraform-provider-github

[BUG]: Resource github_repository_pages doesn't work as expected with custom domain and private Pages

Open
#3,450 27 comments 1 reaction 0 assignees View on GitHub
r/repository_pages Status: Blocked Type: Bug
Dominant language
Go
Stars
1.2k
Forks
1k
Avg merge
1d 14h
Merged PRs (30d)
8

Description

### Expected Behavior

Pages configuration with custom domain and disabled HTTPS enforcement has been successfully created.

### Actual Behavior

CNAME has been ignored and resource generates certificate related error:
```
Error: PUT https://api.github.com/repos/gha-proxy/pages-next/pages: 404 The certificate does not exist yet []

│ with github_repository_pages.this,
│ on main.tf line 25, in resource "github_repository_pages" "this":
│ 25: resource "github_repository_pages" "this" {
```

### Terraform Version

Terraform v1.15.4
on darwin_arm64
+ provider registry.terraform.io/integrations/github v6.12.1

### GitHub Installation Type

- [ ] GitHub.com (Free, Pro, or Team)
- [ ] GitHub Enterprise Server (on-premises)
- [x] GitHub Enterprise Cloud with Personal Accounts (github.com)
- [ ] GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- [ ] GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- [ ] I don't know

### Affected Resource(s)

- github_repository_pages

### Terraform Configuration Files (final config)

```hcl
terraform {
required_version = ">= 1.15"

required_providers {
github = {
source = "integrations/github"
version = ">=6.12.1, <7.0.0"
}
}
}

provider "github" {
owner = var.github_owner
}

resource "github_repository_pages" "this" {
repository = "pages-next"
build_type = "legacy"
cname = "pages-next.lab-pages.kudinov.tech"

source {
branch = "master"
path = "/"
}
https_enforced = false
}

variable "github_owner" {
description = "GitHub organization or user that owns the repository."
type = string
default = "ORG-HERE"
}
```

### Steps to Reproduce

1. Create resource without cname to get random GH domain
```
resource "github_repository_pages" "this" {
repository = "pages-next"
build_type = "legacy"

source {
branch = "master"
path = "/"
}
}
```
2. Apply
3. Set cname only (can NOT be set together with https_enforced as cert is not created and API usually fails with error
` 404 The certificate does not exist yet)`

```
resource "github_repository_pages" "this" {
repository = "pages-next"
build_type = "legacy"
cname = "pages-next-1.pages.central-de.c1.kudinov.tech"

source {
branch = "master"
path = "/"
}
```
4. Apply
5. Set https_enforced = true
```
resource "github_repository_pages" "this" {
repository = "pages-next"
build_type = "legacy"
cname = "pages-next-1.pages.central-de.c1.kudinov.tech"

source {
branch = "master"
path = "/"
}
https_enforced = true
}
```
6. Apply

As result it removed `cname` from GitHub as was sent.
API request for it:
```
tf_http_req_body="{\"cname\":null,\"build_type\":\"legacy\",\"source\":{\"branch\":\"master\",\"path\":\"/\"},\"https_enforced\":true}"
```
So it looses `cname` when try to enforce https, but it can't be done together with setting cname for the site which GH has not yet created cert (if to try it later when cert is in place it can be different behavior).

Means it is back to random GitHub domain, but custom one we expect to set.

### Debug Output (has to be updated)

```shell
terraform app
ly
2026-05-27T15:28:39.590+0200 [INFO] Terraform version: 1.15.4
2026-05-27T15:28:39.590+0200 [DEBUG] using github.com/hashicorp/go-tfe v1.105.0
2026-05-27T15:28:39.590+0200 [DEBUG] using github.com/hashicorp/hcl/v2 v2.24.0
2026-05-27T15:28:39.590+0200 [DEBUG] using github.com/hashicorp/terraform-svchost v0.2.1
2026-05-27T15:28:39.590+0200 [DEBUG] using github.com/zclconf/go-cty v1.18.0
2026-05-27T15:28:39.590+0200 [INFO] Go runtime version: go1.25.10
2026-05-27T15:28:39.590+0200 [INFO] CLI args: []string{"/Users/CENSORED/.asdf/installs/terraform/1.15.4/bin/terraform", "apply"}
2026-05-27T15:28:39.590+0200 [DEBUG] Attempting to open CLI config file: /Users/CENSORED/.terraformrc
2026-05-27T15:28:39.590+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2026-05-27T15:28:39.590+0200 [DEBUG] checking for credentials in "/Users/CENSORED/.terraform.d/plugins"
2026-05-27T15:28:39.590+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2026-05-27T15:28:39.590+0200 [DEBUG] will search for provider plugins in /Users/CENSORED/.terraform.d/plugins
2026-05-27T15:28:39.591+0200 [DEBUG] ignoring non-existing provider search directory /Users/CENSORED/Library/Application Support/io.terraform/plugins
2026-05-27T15:28:39.591+0200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2026-05-27T15:28:39.591+0200 [INFO] CLI command args: []string{"apply"}
2026-05-27T15:28:39.606+0200 [DEBUG] checking for provisioner in "."
2026-05-27T15:28:39.607+0200 [DEBUG] checking for provisioner in "/Users/CENSORED/.asdf/installs/terraform/1.15.4/bin"
2026-05-27T15:28:39.607+0200 [DEBUG] checking for provisioner in "/Users/CENSORED/.terraform.d/plugins"
2026-05-27T15:28:39.607+0200 [INFO] backend/local: starting Apply operation
2026-05-27T15:28:39.609+0200 [DEBUG] ReferenceTransformer: "var.github_owner" references: []
2026-05-27T15:28:39.609+0200 [DEBUG] Starting graph walk: walkInit
2026-05-27T15:28:39.610+0200 [DEBUG] created provider logger: level=debug
2026-05-27T15:28:39.610+0200 [INFO] provider: configuring client automatic mTLS
2026-05-27T15:28:39.615+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 args=[".terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1"]
2026-05-27T15:28:39.617+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 pid=17263
2026-05-27T15:28:39.617+0200 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1
2026-05-27T15:28:39.628+0200 [INFO] provider.terraform-provider-github_v6.12.1: configuring server automatic mTLS: timestamp="2026-05-27T15:28:39.628+0200"
2026-05-27T15:28:39.634+0200 [DEBUG] provider: using plugin: version=5
2026-05-27T15:28:39.634+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: plugin address: network=unix address=/var/folders/9p/zgxkbyj16vxg2m7jvd2ty9yr0000gq/T/plugin552905952 timestamp="2026-05-27T15:28:39.634+0200"
2026-05-27T15:28:39.647+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2026-05-27T15:28:39.648+0200 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 id=17263
2026-05-27T15:28:39.648+0200 [DEBUG] provider: plugin exited
2026-05-27T15:28:39.648+0200 [DEBUG] Building and walking validate graph
2026-05-27T15:28:39.648+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:39.648+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this" references: []
2026-05-27T15:28:39.648+0200 [DEBUG] ReferenceTransformer: "var.github_owner" references: []
2026-05-27T15:28:39.648+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/integrations/github\"]" references: [var.github_owner]
2026-05-27T15:28:39.648+0200 [DEBUG] Starting graph walk: walkValidate
2026-05-27T15:28:39.648+0200 [DEBUG] created provider logger: level=debug
2026-05-27T15:28:39.648+0200 [INFO] provider: configuring client automatic mTLS
2026-05-27T15:28:39.650+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 args=[".terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1"]
2026-05-27T15:28:39.652+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 pid=17264
2026-05-27T15:28:39.652+0200 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1
2026-05-27T15:28:39.662+0200 [INFO] provider.terraform-provider-github_v6.12.1: configuring server automatic mTLS: timestamp="2026-05-27T15:28:39.662+0200"
2026-05-27T15:28:39.668+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: plugin address: address=/var/folders/9p/zgxkbyj16vxg2m7jvd2ty9yr0000gq/T/plugin3602789171 network=unix timestamp="2026-05-27T15:28:39.668+0200"
2026-05-27T15:28:39.668+0200 [DEBUG] provider: using plugin: version=5
2026-05-27T15:28:39.675+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2026-05-27T15:28:39.676+0200 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 id=17264
2026-05-27T15:28:39.676+0200 [DEBUG] provider: plugin exited
2026-05-27T15:28:39.676+0200 [INFO] backend/local: apply calling Plan
2026-05-27T15:28:39.676+0200 [DEBUG] Building and walking plan graph for NormalMode
2026-05-27T15:28:39.676+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:39.676+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this (expand)" references: []
2026-05-27T15:28:39.676+0200 [DEBUG] ReferenceTransformer: "var.github_owner" references: []
2026-05-27T15:28:39.676+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/integrations/github\"]" references: [var.github_owner]
2026-05-27T15:28:39.676+0200 [DEBUG] Starting graph walk: walkPlan
2026-05-27T15:28:39.676+0200 [DEBUG] created provider logger: level=debug
2026-05-27T15:28:39.676+0200 [INFO] provider: configuring client automatic mTLS
2026-05-27T15:28:39.678+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 args=[".terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1"]
2026-05-27T15:28:39.679+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 pid=17265
2026-05-27T15:28:39.679+0200 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1
2026-05-27T15:28:39.688+0200 [INFO] provider.terraform-provider-github_v6.12.1: configuring server automatic mTLS: timestamp="2026-05-27T15:28:39.688+0200"
2026-05-27T15:28:39.693+0200 [DEBUG] provider: using plugin: version=5
2026-05-27T15:28:39.693+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: plugin address: address=/var/folders/9p/zgxkbyj16vxg2m7jvd2ty9yr0000gq/T/plugin2372221243 network=unix timestamp="2026-05-27T15:28:39.693+0200"
2026-05-27T15:28:39.698+0200 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/integrations/github\"]" changed the config value, but that value is unused
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [INFO] Selecting owner from GITHUB_OWNER environment variable: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [INFO] Setting write_delay_ms to 1000: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting read_delay_ms to 0: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting retry_delay_ms to 0: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting max_retries to 3: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting max_per_page to 100: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:39.699+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:39 [DEBUG] Setting parallel_requests to false: timestamp="2026-05-27T15:28:39.699+0200"
2026-05-27T15:28:40.065+0200 [DEBUG] Resource instance state not found for node "github_repository_pages.this", instance github_repository_pages.this
2026-05-27T15:28:40.066+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this" references: []
2026-05-27T15:28:40.066+0200 [DEBUG] refresh: github_repository_pages.this: no state, so not refreshing
2026-05-27T15:28:40.071+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Diffing GitHub Pages: @module=provider tf_provider_addr=provider tf_req_id=ebc8f464-2a82-a424-6a66-82359bf88811 tf_resource_type=github_repository_pages tf_rpc=PlanResourceChange @caller=github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_pages.go:411 timestamp="2026-05-27T15:28:40.071+0200"
2026-05-27T15:28:40.075+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2026-05-27T15:28:40.078+0200 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 id=17265
2026-05-27T15:28:40.078+0200 [DEBUG] provider: plugin exited
2026-05-27T15:28:40.079+0200 [DEBUG] building apply graph to check for errors
2026-05-27T15:28:40.079+0200 [DEBUG] Resource state not found for node "github_repository_pages.this", instance github_repository_pages.this
2026-05-27T15:28:40.079+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:40.079+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:40.079+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this (expand)" references: []
2026-05-27T15:28:40.079+0200 [DEBUG] ReferenceTransformer: "var.github_owner" references: []
2026-05-27T15:28:40.079+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this" references: []
2026-05-27T15:28:40.079+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/integrations/github\"]" references: [var.github_owner]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# github_repository_pages.this will be created
+ resource "github_repository_pages" "this" {
+ api_url = (known after apply)
+ build_status = (known after apply)
+ build_type = "legacy"
+ cname = "pages-next.lab-pages.kudinov.tech"
+ custom_404 = (known after apply)
+ html_url = (known after apply)
+ https_enforced = false
+ id = (known after apply)
+ public = (known after apply)
+ repository = "pages-next"
+ repository_id = (known after apply)

+ source {
+ branch = "master"
+ path = "/"
}
}

Plan: 1 to add, 0 to change, 0 to destroy.
2026-05-27T15:28:40.080+0200 [DEBUG] command: asking for input: "\nDo you want to perform these actions?"

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

2026-05-27T15:28:42.792+0200 [INFO] backend/local: apply calling Apply
2026-05-27T15:28:42.792+0200 [DEBUG] Building and walking apply graph for NormalMode plan
2026-05-27T15:28:42.792+0200 [DEBUG] Resource state not found for node "github_repository_pages.this", instance github_repository_pages.this
2026-05-27T15:28:42.792+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:42.792+0200 [DEBUG] ProviderTransformer: "github_repository_pages.this" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/integrations/github"]
2026-05-27T15:28:42.792+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this (expand)" references: []
2026-05-27T15:28:42.792+0200 [DEBUG] ReferenceTransformer: "var.github_owner" references: []
2026-05-27T15:28:42.792+0200 [DEBUG] ReferenceTransformer: "github_repository_pages.this" references: []
2026-05-27T15:28:42.792+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/integrations/github\"]" references: [var.github_owner]
2026-05-27T15:28:42.793+0200 [DEBUG] Starting graph walk: walkApply
2026-05-27T15:28:42.793+0200 [DEBUG] created provider logger: level=debug
2026-05-27T15:28:42.793+0200 [INFO] provider: configuring client automatic mTLS
2026-05-27T15:28:42.798+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 args=[".terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1"]
2026-05-27T15:28:42.803+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 pid=17281
2026-05-27T15:28:42.803+0200 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1
2026-05-27T15:28:42.818+0200 [INFO] provider.terraform-provider-github_v6.12.1: configuring server automatic mTLS: timestamp="2026-05-27T15:28:42.817+0200"
2026-05-27T15:28:42.826+0200 [DEBUG] provider: using plugin: version=5
2026-05-27T15:28:42.826+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: plugin address: network=unix address=/var/folders/9p/zgxkbyj16vxg2m7jvd2ty9yr0000gq/T/plugin3500234514 timestamp="2026-05-27T15:28:42.826+0200"
2026-05-27T15:28:42.833+0200 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/integrations/github\"]" changed the config value, but that value is unused
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [INFO] Selecting owner from GITHUB_OWNER environment variable: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [INFO] Setting write_delay_ms to 1000: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting read_delay_ms to 0: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting retry_delay_ms to 0: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting max_retries to 3: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting max_per_page to 100: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:42.834+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:42 [DEBUG] Setting parallel_requests to false: timestamp="2026-05-27T15:28:42.834+0200"
2026-05-27T15:28:43.202+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Diffing GitHub Pages: @module=provider tf_provider_addr=provider tf_req_id=27ea8357-4498-cf53-144a-14c97e696065 tf_resource_type=github_repository_pages tf_rpc=PlanResourceChange @caller=github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_pages.go:411 timestamp="2026-05-27T15:28:43.202+0200"
github_repository_pages.this: Creating...
2026-05-27T15:28:43.203+0200 [INFO] Starting apply for github_repository_pages.this
2026-05-27T15:28:43.204+0200 [DEBUG] github_repository_pages.this: applying the planned Create change
2026-05-27T15:28:43.206+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Creating GitHub Pages: @caller=github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_pages.go:120 @module=provider tf_provider_addr=provider tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_resource_type=github_repository_pages tf_rpc=ApplyResourceChange timestamp="2026-05-27T15:28:43.206+0200"
2026-05-27T15:28:43.206+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Sending HTTP Request: tf_http_req_uri=/repos/CENSORED/pages-next/pages tf_http_req_version=HTTP/1.1 tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 User-Agent=go-github/v85.0.0 tf_http_trans_id=f451d375-16ae-2bb7-ab45-4f2f7a2d9896 tf_provider_addr=provider Content-Type=application/json Host=api.github.com X-Github-Api-Version=2022-11-28 @module=provider Accept="application/vnd.github.switcheroo-preview+json,application/vnd.github.stone-crop-preview+json" Accept-Encoding=gzip Content-Length=53 tf_http_req_body="{\"build_type\":\"legacy\",\"source\":{\"branch\":\"master\"}}" tf_http_req_method=POST tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_resource_type=github_repository_pages tf_http_op_type=request timestamp="2026-05-27T15:28:43.206+0200"
2026-05-27T15:28:46.584+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Received HTTP Response: X-Github-Request-Id=880D:11C63F:7584E2:8D6E63:6A16F18B tf_provider_addr=provider Access-Control-Expose-Headers="ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning" Cache-Control="private, max-age=60, s-maxage=60" X-Ratelimit-Resource=core tf_http_res_body="{\"url\":\"https://api.github.com/repos/CENSORED/pages-next/pages\",\"status\":\"building\",\"cname\":null,\"custom_404\":false,\"html_url\":\"https://urban-dollop-zgp58kl.pages.github.io/\",\"build_type\":\"legacy\",\"source\":{\"branch\":\"master\",\"path\":\"/\"},\"public\":false,\"protected_domain_state\":null,\"pending_domain_unverified_at\":null,\"https_enforced\":true}" Last-Modified="Wed, 27 May 2026 07:03:39 GMT" Server=github.com tf_http_trans_id=f451d375-16ae-2bb7-ab45-4f2f7a2d9896 tf_resource_type=github_repository_pages tf_rpc=ApplyResourceChange @module=provider X-Content-Type-Options=nosniff Content-Security-Policy="default-src 'none'" Vary="Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With" tf_http_res_version=HTTP/2.0 tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e Etag="\"bf27ea063e29d4a20cbdfb6dbc8d7b38f8d7f12d3b0a1e9a63661462da7a73a7\"" Content-Type="application/json; charset=utf-8" Date="Wed, 27 May 2026 13:28:46 GMT" X-Github-Api-Version-Selected=2022-11-28 X-Oauth-Scopes=repo X-Ratelimit-Reset=1779891410 X-Ratelimit-Used=22 @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 Content-Length=341 X-Frame-Options=deny X-Ratelimit-Limit=5000 tf_http_op_type=response tf_http_res_status_code=201 tf_http_res_status_reason="201 Created" Github-Authentication-Token-Expiration="2026-06-26 07:39:20 UTC" Access-Control-Allow-Origin="*" Location=https://api.github.com/repos/CENSORED/pages-next/pages Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" X-Accepted-Oauth-Scopes="" X-Ratelimit-Remaining=4978 X-Xss-Protection=0 X-Github-Media-Type="github.v3; param=switcheroo-preview.stone-crop-preview; format=json" timestamp="2026-05-27T15:28:46.583+0200"
2026-05-27T15:28:46.584+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Sending HTTP Request: tf_http_req_method=GET tf_http_req_uri=/repos/CENSORED/pages-next @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 User-Agent=go-github/v85.0.0 tf_http_req_version=HTTP/1.1 tf_resource_type=github_repository_pages Accept="application/vnd.github.scarlet-witch-preview+json, application/vnd.github.mercy-preview+json, application/vnd.github.baptiste-preview+json, application/vnd.github.nebula-preview+json,application/vnd.github.stone-crop-preview+json" tf_http_trans_id=a2086f5b-ca5a-5d3d-f775-915a8023b791 tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_provider_addr=provider tf_rpc=ApplyResourceChange @module=provider Accept-Encoding=gzip Host=api.github.com X-Github-Api-Version=2022-11-28 tf_http_op_type=request tf_http_req_body="" timestamp="2026-05-27T15:28:46.584+0200"
2026-05-27T15:28:46.584+0200 [INFO] provider.terraform-provider-github_v6.12.1: 2026/05/27 15:28:46 [DEBUG] Sleeping 1s between operations: timestamp="2026-05-27T15:28:46.584+0200"
2026-05-27T15:28:48.260+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Received HTTP Response: Etag="W/\"cb6b3d7ed64acc466b78283ffe5e579a2feb2c8b2e36fe54163300d2b81f3966\"" Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" X-Frame-Options=deny X-Ratelimit-Limit=5000 tf_http_res_body="{\"id\":1236384180,\"node_id\":\"R_kgDOSbG5tA\",\"name\":\"pages-next\",\"full_name\":\"CENSORED/pages-next\",\"private\":true,\"owner\":{\"login\":\"CENSORED\",\"id\":211527683,\"node_id\":\"O_kgDODJuoAw\",\"avatar_url\":\"https://avatars.githubusercontent.com/u/211527683?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/CENSORED\",\"html_url\":\"https://github.com/CENSORED\",\"followers_url\":\"https://api.github.com/users/CENSORED/followers\",\"following_url\":\"https://api.github.com/users/CENSORED/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/CENSORED/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/CENSORED/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/CENSORED/subscriptions\",\"organizations_url\":\"https://api.github.com/users/CENSORED/orgs\",\"repos_url\":\"https://api.github.com/users/CENSORED/repos\",\"events_url\":\"https://api.github.com/users/CENSORED/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/CENSORED/received_events\",\"type\":\"Organization\",\"user_view_type\":\"public\",\"site_admin\":false},\"html_url\":\"https://github.com/CENSORED/pages-next\",\"description\":null,\"fork\":false,\"url\":\"https://api.github.com/repos/CENSORED/pages-next\",\"forks_url\":\"https://api.github.com/repos/CENSORED/pages-next/forks\",\"keys_url\":\"https://api.github.com/repos/CENSORED/pages-next/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/CENSORED/pages-next/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/CENSORED/pages-next/teams\",\"hooks_url\":\"https://api.github.com/repos/CENSORED/pages-next/hooks\",\"issue_events_url\":\"https://api.github.com/repos/CENSORED/pages-next/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/CENSORED/pages-next/events\",\"assignees_url\":\"https://api.github.com/repos/CENSORED/pages-next/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/CENSORED/pages-next/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/CENSORED/pages-next/tags\",\"blobs_url\":\"https://api.github.com/repos/CENSORED/pages-next/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/CENSORED/pages-next/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/CENSORED/pages-next/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/CENSORED/pages-next/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/CENSORED/pages-next/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/CENSORED/pages-next/languages\",\"stargazers_url\":\"https://api.github.com/repos/CENSORED/pages-next/stargazers\",\"contributors_url\":\"https://api.github.com/repos/CENSORED/pages-next/contributors\",\"subscribers_url\":\"https://api.github.com/repos/CENSORED/pages-next/subscribers\",\"subscription_url\":\"https://api.github.com/repos/CENSORED/pages-next/subscription\",\"commits_url\":\"https://api.github.com/repos/CENSORED/pages-next/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/CENSORED/pages-next/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/CENSORED/pages-next/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/CENSORED/pages-next/issues/comments{/number}\",\"contents_url\":\"https://api.github.com/repos/CENSORED/pages-next/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/CENSORED/pages-next/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/CENSORED/pages-next/merges\",\"archive_url\":\"https://api.github.com/repos/CENSORED/pages-next/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/CENSORED/pages-next/downloads\",\"issues_url\":\"https://api.github.com/repos/CENSORED/pages-next/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/CENSORED/pages-next/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/CENSORED/pages-next/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/CENSORED/pages-next/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/CENSORED/pages-next/labels{/name}\",\"releases_url\":\"https://api.github.com/repos/CENSORED/pages-next/releases{/id}\",\"deployments_url\":\"https://api.github.com/repos/CENSORED/pages-next/deployments\",\"created_at\":\"2026-05-12T07:42:46Z\",\"updated_at\":\"2026-05-27T07:03:39Z\",\"pushed_at\":\"2026-05-27T07:03:35Z\",\"git_url\":\"git://github.com/CENSORED/pages-next.git\",\"ssh_url\":\"git@github.com:CENSORED/pages-next.git\",\"clone_url\":\"https://github.com/CENSORED/pages-next.git\",\"svn_url\":\"https://github.com/CENSORED/pages-next\",\"homepage\":null,\"size\":4,\"stargazers_count\":0,\"watchers_count\":0,\"language\":null,\"has_issues\":true,\"has_projects\":false,\"has_downloads\":true,\"has_wiki\":true,\"has_pages\":true,\"has_discussions\":false,\"forks_count\":0,\"mirror_url\":null,\"archived\":false,\"disabled\":false,\"open_issues_count\":0,\"license\":null,\"allow_forking\":false,\"is_template\":false,\"web_commit_signoff_required\":false,\"has_pull_requests\":true,\"pull_request_creation_policy\":\"all\",\"topics\":[],\"visibility\":\"private\",\"forks\":0,\"open_issues\":0,\"watchers\":0,\"default_branch\":\"master\",\"permissions\":{\"admin\":true,\"maintain\":true,\"push\":true,\"triage\":true,\"pull\":true},\"temp_clone_token\":\"ANOSP7UKC44COAPIOD3VRNLKC3ZLY\",\"allow_squash_merge\":true,\"allow_merge_commit\":true,\"allow_rebase_merge\":true,\"allow_auto_merge\":false,\"delete_branch_on_merge\":false,\"allow_update_branch\":false,\"use_squash_pr_title_as_default\":false,\"squash_merge_commit_message\":\"COMMIT_MESSAGES\",\"squash_merge_commit_title\":\"COMMIT_OR_PR_TITLE\",\"merge_commit_message\":\"PR_TITLE\",\"merge_commit_title\":\"MERGE_MESSAGE\",\"custom_properties\":{},\"organization\":{\"login\":\"CENSORED\",\"id\":211527683,\"node_id\":\"O_kgDODJuoAw\",\"avatar_url\":\"https://avatars.githubusercontent.com/u/211527683?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/CENSORED\",\"html_url\":\"https://github.com/CENSORED\",\"followers_url\":\"https://api.github.com/users/CENSORED/followers\",\"following_url\":\"https://api.github.com/users/CENSORED/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/CENSORED/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/CENSORED/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/CENSORED/subscriptions\",\"organizations_url\":\"https://api.github.com/users/CENSORED/orgs\",\"repos_url\":\"https://api.github.com/users/CENSORED/repos\",\"events_url\":\"https://api.github.com/users/CENSORED/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/CENSORED/received_events\",\"type\":\"Organization\",\"user_view_type\":\"public\",\"site_admin\":false},\"security_and_analysis\":{\"code_security\":{\"status\":\"disabled\"},\"secret_scanning\":{\"status\":\"disabled\"},\"secret_scanning_push_protection\":{\"status\":\"disabled\"},\"dependabot_security_updates\":{\"status\":\"disabled\"},\"secret_scanning_non_provider_patterns\":{\"status\":\"disabled\"},\"secret_scanning_validity_checks\":{\"status\":\"disabled\"}},\"network_count\":0,\"subscribers_count\":0}" tf_http_trans_id=a2086f5b-ca5a-5d3d-f775-915a8023b791 Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" X-Github-Api-Version-Selected=2022-11-28 X-Oauth-Scopes=repo tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_rpc=ApplyResourceChange Cache-Control="private, max-age=60, s-maxage=60" Content-Type="application/json; charset=utf-8" Github-Authentication-Token-Expiration="2026-06-26 07:39:20 UTC" Server=github.com X-Github-Request-Id=880D:11C63F:758852:8D724F:6A16F18E X-Ratelimit-Reset=1779891410 X-Ratelimit-Used=23 tf_http_res_status_code=200 Access-Control-Expose-Headers="ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning" X-Xss-Protection=0 Content-Security-Policy="default-src 'none'" Last-Modified="Wed, 27 May 2026 07:03:39 GMT" tf_http_op_type=response tf_http_res_version=HTTP/2.0 X-Github-Media-Type="github.v3; param=scarlet-witch-preview; format=json, github.mercy-preview; param=baptiste-preview.nebula-preview.stone-crop-preview; format=json" X-Ratelimit-Remaining=4977 X-Ratelimit-Resource=core tf_http_res_status_reason="200 OK" Vary="Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With" X-Accepted-Oauth-Scopes=repo X-Content-Type-Options=nosniff tf_provider_addr=provider tf_resource_type=github_repository_pages @module=provider Access-Control-Allow-Origin="*" Date="Wed, 27 May 2026 13:28:48 GMT" @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 timestamp="2026-05-27T15:28:48.259+0200"
2026-05-27T15:28:48.262+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Do we have values set that need the update logic?: cname="" public_ok_exists=false tf_resource_type=github_repository_pages tf_rpc=ApplyResourceChange @caller=github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_pages.go:196 @module=provider cname_ok=false https_enforced_exists=true public=false tf_provider_addr=provider https_enforced=false tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e timestamp="2026-05-27T15:28:48.261+0200"
2026-05-27T15:28:48.262+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Sending HTTP Request: tf_provider_addr=provider Content-Length=38 @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 Content-Type=application/json Host=api.github.com User-Agent=go-github/v85.0.0 tf_http_req_body="{\"cname\":null,\"https_enforced\":false}" tf_http_trans_id=5fd0986d-69f4-f60b-8547-a6588b078fef tf_resource_type=github_repository_pages Accept-Encoding=gzip tf_http_op_type=request tf_http_req_version=HTTP/1.1 tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_rpc=ApplyResourceChange @module=provider Accept="application/vnd.github.v3+json,application/vnd.github.stone-crop-preview+json" X-Github-Api-Version=2022-11-28 tf_http_req_method=PUT tf_http_req_uri=/repos/CENSORED/pages-next/pages timestamp="2026-05-27T15:28:48.262+0200"
2026-05-27T15:28:48.554+0200 [DEBUG] provider.terraform-provider-github_v6.12.1: Received HTTP Response: Access-Control-Expose-Headers="ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning" Content-Type="application/json; charset=utf-8" Vary="Accept-Encoding, Accept, X-Requested-With" X-Accepted-Oauth-Scopes="" X-Github-Media-Type="github.v3; param=stone-crop-preview; format=json" tf_http_op_type=response tf_provider_addr=provider Access-Control-Allow-Origin="*" Server=github.com X-Xss-Protection=0 tf_http_res_status_reason="404 Not Found" tf_http_trans_id=5fd0986d-69f4-f60b-8547-a6588b078fef tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" X-Ratelimit-Reset=1779891410 tf_http_res_status_code=404 Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" X-Content-Type-Options=nosniff X-Oauth-Scopes=repo X-Ratelimit-Limit=5000 X-Ratelimit-Resource=core tf_http_res_body="{\"message\":\"The certificate does not exist yet\",\"documentation_url\":\"https://docs.github.com/rest/pages/pages#update-information-about-a-apiname-pages-site\",\"status\":\"404\"}" @module=provider X-Frame-Options=deny X-Ratelimit-Used=24 tf_http_res_version=HTTP/2.0 tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-sdk/v2@v2.38.2/helper/logging/logging_http_transport.go:162 Content-Security-Policy="default-src 'none'" X-Ratelimit-Remaining=4976 tf_resource_type=github_repository_pages Date="Wed, 27 May 2026 13:28:48 GMT" Github-Authentication-Token-Expiration="2026-06-26 07:39:20 UTC" X-Github-Api-Version-Selected=2022-11-28 X-Github-Request-Id=880D:11C63F:7588C3:8D72CD:6A16F190 timestamp="2026-05-27T15:28:48.553+0200"
2026-05-27T15:28:48.554+0200 [ERROR] provider.terraform-provider-github_v6.12.1: Response contains error diagnostic: tf_rpc=ApplyResourceChange @module=sdk.proto diagnostic_detail="" tf_proto_version=5.10 tf_req_id=ca7395db-d398-26a4-b4b7-a0352f62ba5e tf_resource_type=github_repository_pages @caller=github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_severity=ERROR diagnostic_summary="PUT https://api.github.com/repos/CENSORED/pages-next/pages: 404 The certificate does not exist yet []" tf_provider_addr=provider timestamp="2026-05-27T15:28:48.554+0200"
2026-05-27T15:28:48.563+0200 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2026-05-27T15:28:48.563+0200 [ERROR] vertex "github_repository_pages.this" error: PUT https://api.github.com/repos/CENSORED/pages-next/pages: 404 The certificate does not exist yet []

│ Error: PUT https://api.github.com/repos/CENSORED/pages-next/pages: 404 The certificate does not exist yet []

│ with github_repository_pages.this,
│ on main.tf line 25, in resource "github_repository_pages" "this":
│ 25: resource "github_repository_pages" "this" {


2026-05-27T15:28:48.572+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2026-05-27T15:28:48.575+0200 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/integrations/github/6.12.1/darwin_arm64/terraform-provider-github_v6.12.1 id=17281
2026-05-27T15:28:48.575+0200 [DEBUG] provider: plugin exited
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.