Skip to content

[BUG]: cannot use ignore_vulnerability_alerts_during_read for terraform import #3111

Closed

Description

@lens0021

Expected Behavior

When importing a github_repository using a token with limited permissions, it should be possible to skip the vulnerability alerts API call if well configured.

Actual Behavior

There is ignore_vulnerability_alerts_during_read option at the resource level which is ignored during terraform import. This is because resource configuration values are not accessible to the provider during the import process. As a result, the provider attempts to call the vulnerability alerts API, fails due to insufficient permissions, and the import process results in 401.

Terraform Version

OpenTofu v1.11.2
on linux_amd64
+ provider registry.opentofu.org/integrations/github v6.9.1

I guess this bug is valid in Terraform too.

Affected Resource(s)

github_repository?

Terraform Configuration Files

import {
  id = "declam"
  to = github_repository.this
}
resource "github_repository" "this" {
  allow_auto_merge                        = false
  allow_merge_commit                      = false
  allow_rebase_merge                      = false
  allow_squash_merge                      = true
  allow_update_branch                     = true
  archived                                = false
  archive_on_destroy                      = true
  auto_init                               = false
  delete_branch_on_merge                  = true
  description                             = ""
  has_discussions                         = false
  has_downloads                           = true
  has_issues                              = true
  has_projects                            = false
  has_wiki                                = false
  ignore_vulnerability_alerts_during_read = true
  homepage_url                            = ""
  name                                    = "declam"
  squash_merge_commit_message             = "BLANK"
  squash_merge_commit_title               = "PR_TITLE"
  topics                                  = []
  visibility                              = "public"
  web_commit_signoff_required             = false

  security_and_analysis {
    secret_scanning {
      status = "enabled"
    }
    secret_scanning_push_protection {
      status = "enabled"
    }
  }
}

Steps to Reproduce

To be honestly, I tried this on a github actions runner with GITHUB_TOKEN. I think this is not the supported use case. Anyway, the workflow is:

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: opentofu/setup-opentofu@9d84900f3238fab8cd84ce47d658d25dd008be2f # v1.0.8
- run: tofu init
- run: tofu plan -no-color

Debug Output

2026-01-22T14:37:32.140Z [DEBUG] provider.terraform-provider-github_v6.9.1: Sending HTTP Request: X-Github-Api-Version=2022-11-28 new_logger_warning="This log was generated by a subsystem logger that wasn't created before being used. Use tflog.NewSubsystem to create this logger before it is used." @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/logging/logging_http_transport.go:160 tf_http_op_type=request tf_http_req_version=HTTP/1.1 tf_http_trans_id=5dfe8d23-a2de-7ce7-f37c-ce0b9ef5595a tf_http_req_body="" @module=provider.GitHub Accept-Encoding=gzip Accept="application/vnd.github.dorian-preview+json,application/vnd.github.stone-crop-preview+json" Host=api.github.com tf_http_req_method=GET tf_http_req_uri=/repos/lens0021/declam/vulnerability-alerts User-Agent=go-github/v67.0.0 timestamp=2026-01-22T14:37:32.139Z
2026-01-22T14:37:32.162Z [DEBUG] provider.terraform-provider-github_v6.9.1: Received HTTP Response: @module=provider.GitHub Server=github.com X-Ratelimit-Used=4 X-Xss-Protection=0 @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/logging/logging_http_transport.go:160 tf_http_trans_id=5dfe8d23-a2de-7ce7-f37c-ce0b9ef5595a new_logger_warning="This log was generated by a subsystem logger that wasn't created before being used. Use tflog.NewSubsystem to create this logger before it is used." Content-Security-Policy="default-src 'none'" Content-Type="application/json; charset=utf-8" Vary="Accept-Encoding, Accept, X-Requested-With" X-Content-Type-Options=nosniff X-Github-Request-Id=7C30:321683:F3D2B6:443D7C3:6972362C X-Ratelimit-Resource=core tf_http_res_version=HTTP/2.0 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" X-Frame-Options=deny X-Ratelimit-Remaining=56 tf_http_op_type=response Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" Content-Length=120 Date="Thu, 22 Jan 2026 14:37:32 GMT" X-Ratelimit-Reset=1769094261
  tf_http_res_body=
  | {\r
  |   "message": "Requires authentication",\r
  |   "documentation_url": "https://docs.github.com/rest",\r
  |   "status": "401"\r
  | }
   X-Github-Media-Type="github.v3; format=json" X-Ratelimit-Limit=60 tf_http_res_status_code=401 tf_http_res_status_reason="401 Unauthorized" Access-Control-Allow-Origin="*" timestamp=2026-01-22T14:37:32.162Z
Error: -22T14:37:32.162Z [ERROR] provider.terraform-provider-github_v6.9.1: Response contains error diagnostic: @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" diagnostic_severity=ERROR diagnostic_summary="error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []" tf_req_id=f307d037-97b8-817a-4877-39ee2633a73b tf_resource_type=github_repository tf_rpc=ReadResource @module=sdk.proto tf_proto_version=5.10 tf_provider_addr=provider timestamp=2026-01-22T14:37:32.162Z
Error: -22T14:37:32.163Z [ERROR] vertex "github_repository.this" error: error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []
Error: -22T14:37:32.163Z [ERROR] vertex "github_repository.this (expand)" error: error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Bug
    Status: Triage
    on Jan 22, 2026
  2. github-actions commented on Jan 22, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  3. stevehipwell commented on Jan 27, 2026

    @stevehipwell
    Collaborator

    @lens0021 please could you try again with the latest provider version.

  4. lens0021 commented on Jan 27, 2026

    @lens0021
    Author

    Apologies, I did not try the latest version somehow. Now I've tried the latest version, and it is the same on v6.10.2.
    Looking at v6.9.1...v6.10.2, it does not seem like any fixes for this issue. And deiga pointed out in my previous PR:

    Hi @lens0021 👋
    
    Thanks for this contribution! We are on the way of removing vulnerability_alerts from the `github_repository` resource entirely, which makes me consider that we don't want to merge this PR.
    
    Would you be willing instead to either fully implement [this issue](https://github.com/integrations/terraform-provider-github/issues/3038) or at least the 2 tasks in the middle?

    I haven't been able to follow up on the suggested tasks yet.

  5. stevehipwell commented on Jan 27, 2026

    @stevehipwell
    Collaborator

    @lens0021 this isn't an error in import, it's an error in update. A full debug output including the plan would have made this much clearer. I'm pretty sure that #3127 will fix this.

  6. removed
    Status: Triage
    on Jan 27, 2026
  7. self-assigned this
    on Jan 27, 2026
  8. added this to the v6.11.0 Release milestone on Jan 27, 2026
  9. lens0021 commented on Jan 27, 2026

    @lens0021
    Author

    @stevehipwell I tested #3127 PR, but it doesn't seem to be working as expected. After some manual testing, I generated a workflow to test multiple combinations using an AI bot. (Apologies if you prefer to avoid AI-generated; I used AI after my manual checks):

    The TF_LOG=DEBUG logs show tf_rpc=ReadResource is still called and results in 401 Requires authentication.

    log backup in case the workflow run expires

    2026-01-27T15:31:46.646Z [INFO]  OpenTofu version: 1.11.4
    2026-01-27T15:31:46.646Z [DEBUG] using github.com/hashicorp/go-tfe v1.95.0
    2026-01-27T15:31:46.646Z [DEBUG] using github.com/opentofu/hcl/v2 v2.20.2-0.20251021132045-587d123c2828
    2026-01-27T15:31:46.646Z [DEBUG] using github.com/zclconf/go-cty v1.17.0
    2026-01-27T15:31:46.646Z [INFO]  Go runtime version: go1.25.6
    2026-01-27T15:31:46.646Z [INFO]  CLI args: []string{"/home/runner/work/_temp/bfcd1177-0aa8-4c77-b93a-0621f9176527/tofu-bin", "version"}
    2026-01-27T15:31:46.646Z [DEBUG] Attempting to open CLI config file: /home/runner/.config/opentofu/tofurc
    2026-01-27T15:31:46.646Z [INFO]  Loading CLI configuration from /home/runner/.config/opentofu/tofurc
    2026-01-27T15:31:46.646Z [DEBUG] Explicit provider installation configuration is set
    2026-01-27T15:31:46.647Z [DEBUG] Found the config directory: /home/runner/.config/opentofu
    2026-01-27T15:31:46.647Z [INFO]  CLI command args: []string{"version"}
    2026-01-27T15:31:46.647Z [DEBUG] Provider registry.opentofu.org/integrations/github is overridden by dev_overrides
    OpenTofu v1.11.4
    on linux_amd64
    + provider registry.opentofu.org/integrations/github v6.10.2
    === Running plan ===
    2026-01-27T15:31:46.753Z [INFO]  OpenTofu version: 1.11.4
    2026-01-27T15:31:46.753Z [DEBUG] using github.com/hashicorp/go-tfe v1.95.0
    2026-01-27T15:31:46.753Z [DEBUG] using github.com/opentofu/hcl/v2 v2.20.2-0.20251021132045-587d123c2828
    2026-01-27T15:31:46.753Z [DEBUG] using github.com/zclconf/go-cty v1.17.0
    2026-01-27T15:31:46.753Z [INFO]  Go runtime version: go1.25.6
    2026-01-27T15:31:46.753Z [INFO]  CLI args: []string{"/home/runner/work/_temp/bfcd1177-0aa8-4c77-b93a-0621f9176527/tofu-bin", "plan", "-no-color"}
    2026-01-27T15:31:46.753Z [DEBUG] Attempting to open CLI config file: /home/runner/.config/opentofu/tofurc
    2026-01-27T15:31:46.753Z [INFO]  Loading CLI configuration from /home/runner/.config/opentofu/tofurc
    2026-01-27T15:31:46.753Z [DEBUG] Explicit provider installation configuration is set
    2026-01-27T15:31:46.753Z [DEBUG] Found the config directory: /home/runner/.config/opentofu
    2026-01-27T15:31:46.753Z [INFO]  CLI command args: []string{"plan", "-no-color"}
    2026-01-27T15:31:46.756Z [DEBUG] Provider registry.opentofu.org/integrations/github is overridden by dev_overrides
    2026-01-27T15:31:46.756Z [DEBUG] Provider registry.opentofu.org/integrations/github is overridden to load from /home/runner/work/declam/declam/.github/tf
    2026-01-27T15:31:46.756Z [DEBUG] checking for provisioner in "."
    2026-01-27T15:31:46.756Z [DEBUG] checking for provisioner in "/home/runner/work/_temp/bfcd1177-0aa8-4c77-b93a-0621f9176527"
    2026-01-27T15:31:46.756Z [DEBUG] Provider registry.opentofu.org/integrations/github is overridden by dev_overrides
    2026-01-27T15:31:46.757Z [INFO]  backend/local: starting Plan operation
    
    Warning: Provider development overrides are in effect
    
    The following provider development overrides are set in the CLI
    configuration:
     - integrations/github in /home/runner/work/declam/declam/.github/tf
    
    The behavior may therefore not match any released version of the provider and
    applying changes may cause the state to become incompatible with published
    releases.
    2026-01-27T15:31:46.757Z [DEBUG] Config.VerifyDependencySelections: skipping registry.opentofu.org/integrations/github because it's overridden by a special configuration setting
    2026-01-27T15:31:46.757Z [DEBUG] created provider logger: level=debug
    2026-01-27T15:31:46.757Z [INFO]  provider: configuring client automatic mTLS
    2026-01-27T15:31:46.776Z [DEBUG] provider: starting plugin: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github args=["/home/runner/work/declam/declam/.github/tf/terraform-provider-github"]
    2026-01-27T15:31:46.777Z [DEBUG] provider: plugin started: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github pid=5166
    2026-01-27T15:31:46.777Z [DEBUG] provider: waiting for RPC address: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github
    2026-01-27T15:31:46.782Z [INFO]  provider.terraform-provider-github: configuring server automatic mTLS: timestamp=2026-01-27T15:31:46.782Z
    2026-01-27T15:31:46.799Z [DEBUG] provider: using plugin: version=5
    2026-01-27T15:31:46.800Z [DEBUG] provider.terraform-provider-github: plugin address: address=/tmp/plugin507320875 network=unix timestamp=2026-01-27T15:31:46.799Z
    2026-01-27T15:31:46.820Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
    2026-01-27T15:31:46.822Z [INFO]  provider: plugin process exited: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github id=5166
    2026-01-27T15:31:46.822Z [DEBUG] provider: plugin exited
    2026-01-27T15:31:46.822Z [DEBUG] Building and walking validate graph
    2026-01-27T15:31:46.822Z [DEBUG] ProviderTransformer: "github_repository.this" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
    2026-01-27T15:31:46.822Z [DEBUG] ProviderTransformer: "github_workflow_repository_permissions.this" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
    2026-01-27T15:31:46.822Z [DEBUG] ReferenceTransformer: "github_repository.this" references: []
    2026-01-27T15:31:46.822Z [DEBUG] ReferenceTransformer: "github_workflow_repository_permissions.this" references: [github_repository.this]
    2026-01-27T15:31:46.823Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
    2026-01-27T15:31:46.823Z [DEBUG] Starting graph walk: walkValidate
    2026-01-27T15:31:46.823Z [DEBUG] created provider logger: level=debug
    2026-01-27T15:31:46.823Z [INFO]  provider: configuring client automatic mTLS
    2026-01-27T15:31:46.828Z [DEBUG] provider: starting plugin: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github args=["/home/runner/work/declam/declam/.github/tf/terraform-provider-github"]
    2026-01-27T15:31:46.829Z [DEBUG] provider: plugin started: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github pid=5178
    2026-01-27T15:31:46.829Z [DEBUG] provider: waiting for RPC address: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github
    2026-01-27T15:31:46.832Z [INFO]  provider.terraform-provider-github: configuring server automatic mTLS: timestamp=2026-01-27T15:31:46.832Z
    2026-01-27T15:31:46.849Z [DEBUG] provider: using plugin: version=5
    2026-01-27T15:31:46.849Z [DEBUG] provider.terraform-provider-github: plugin address: address=/tmp/plugin2083776519 network=unix timestamp=2026-01-27T15:31:46.849Z
    2026-01-27T15:31:46.864Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
    2026-01-27T15:31:46.865Z [INFO]  provider: plugin process exited: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github id=5178
    2026-01-27T15:31:46.865Z [DEBUG] provider: plugin exited
    2026-01-27T15:31:46.865Z [INFO]  backend/local: plan calling Plan
    2026-01-27T15:31:46.865Z [DEBUG] Building and walking plan graph for NormalMode
    2026-01-27T15:31:46.866Z [DEBUG] ProviderTransformer: "github_repository.this (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
    2026-01-27T15:31:46.866Z [DEBUG] ProviderTransformer: "github_workflow_repository_permissions.this (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
    2026-01-27T15:31:46.866Z [DEBUG] ReferenceTransformer: "github_repository.this (expand)" references: []
    2026-01-27T15:31:46.866Z [DEBUG] ReferenceTransformer: "github_workflow_repository_permissions.this (expand)" references: [github_repository.this (expand)]
    2026-01-27T15:31:46.866Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
    2026-01-27T15:31:46.866Z [DEBUG] Starting graph walk: walkPlan
    2026-01-27T15:31:46.867Z [DEBUG] created provider logger: level=debug
    2026-01-27T15:31:46.867Z [INFO]  provider: configuring client automatic mTLS
    2026-01-27T15:31:46.872Z [DEBUG] provider: starting plugin: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github args=["/home/runner/work/declam/declam/.github/tf/terraform-provider-github"]
    2026-01-27T15:31:46.872Z [DEBUG] provider: plugin started: path=/home/runner/work/declam/declam/.github/tf/terraform-provider-github pid=5187
    2026-01-27T15:31:46.872Z [DEBUG] provider: waiting for RPC address: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github
    2026-01-27T15:31:46.875Z [INFO]  provider.terraform-provider-github: configuring server automatic mTLS: timestamp=2026-01-27T15:31:46.875Z
    2026-01-27T15:31:46.892Z [DEBUG] provider: using plugin: version=5
    2026-01-27T15:31:46.892Z [DEBUG] provider.terraform-provider-github: plugin address: address=/tmp/plugin2574327331 network=unix timestamp=2026-01-27T15:31:46.892Z
    2026-01-27T15:31:46.904Z [WARN]  ValidateProviderConfig from "provider[\"registry.opentofu.org/integrations/github\"]" changed the config value, but that value is unused
    2026-01-27T15:31:46.904Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:46 [INFO] Selecting owner  from GITHUB_OWNER environment variable: timestamp=2026-01-27T15:31:46.904Z
    2026-01-27T15:31:46.904Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:46 [INFO] No token found, using GitHub CLI to get token from hostname api.github.com: timestamp=2026-01-27T15:31:46.904Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Error getting token from GitHub CLI: exit status 1: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [INFO] Setting write_delay_ms to 1000: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting read_delay_ms to 0: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting retry_delay_ms to 0: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting max_retries to 3: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting max_per_page to 100: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.074Z [INFO]  provider.terraform-provider-github: 2026/01/27 15:31:47 [DEBUG] Setting parallel_requests to false: timestamp=2026-01-27T15:31:47.074Z
    2026-01-27T15:31:47.228Z [DEBUG] Resource instance state not found for node "github_repository.this", instance github_repository.this
    2026-01-27T15:31:47.228Z [DEBUG] ReferenceTransformer: "github_repository.this" references: []
    github_repository.this: Preparing import... [id=declam]
    github_repository.this: Refreshing state... [id=declam]
    2026-01-27T15:31:47.231Z [DEBUG] provider.terraform-provider-github: Sending HTTP Request: Accept-Encoding=gzip Host=api.github.com User-Agent=go-github/v81.0.0 X-Github-Api-Version=2022-11-28 tf_http_req_version=HTTP/1.1 tf_resource_type=github_repository tf_http_op_type=request tf_http_req_body="" tf_provider_addr=provider @module=provider tf_rpc=ReadResource @caller=/tmp/terraform-provider-github/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging_http_transport.go:162 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_req_method=GET tf_http_req_uri=/repos/lens0021/declam tf_http_trans_id=ea379068-142e-9f46-a641-a1198a6b55fa tf_req_id=11c61887-2b9a-6f82-53f2-188a6db39647 timestamp=2026-01-27T15:31:47.230Z
    2026-01-27T15:31:47.376Z [DEBUG] provider.terraform-provider-github: Received HTTP Response: Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" X-Content-Type-Options=nosniff X-Ratelimit-Used=5 tf_http_res_version=HTTP/2.0 tf_http_trans_id=ea379068-142e-9f46-a641-a1198a6b55fa Content-Security-Policy="default-src 'none'" Vary="Accept,Accept-Encoding, Accept, X-Requested-With" 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" @caller=/tmp/terraform-provider-github/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging_http_transport.go:162 Server=github.com X-Ratelimit-Limit=60 X-Xss-Protection=0 tf_http_res_body="{\"id\":1132125487,\"node_id\":\"R_kgDOQ3rdLw\",\"name\":\"declam\",\"full_name\":\"lens0021/declam\",\"private\":false,\"owner\":{\"login\":\"lens0021\",\"id\":28209361,\"node_id\":\"MDQ6VXNlcjI4MjA5MzYx\",\"avatar_url\":\"https://avatars.githubusercontent.com/u/28209361?v=4\",\"gravatar_id\":\"\",\"url\":\"[https://api.github.com/users/lens0021\](https://api.github.com/users/lens0021/)",\"html_url\":\"[https://github.com/lens0021\](https://github.com/lens0021/)",\"followers_url\":\"[https://api.github.com/users/lens0021/followers\](https://api.github.com/users/lens0021/followers/)",\"following_url\":\"[https://api.github.com/users/lens0021/following{/other_user}\](https://api.github.com/users/lens0021/following%7B/other_user%7D/)",\"gists_url\":\"[https://api.github.com/users/lens0021/gists{/gist_id}\](https://api.github.com/users/lens0021/gists%7B/gist_id%7D/)",\"starred_url\":\"[https://api.github.com/users/lens0021/starred{/owner}{/repo}\](https://api.github.com/users/lens0021/starred%7B/owner%7D%7B/repo%7D/)",\"subscriptions_url\":\"[https://api.github.com/users/lens0021/subscriptions\](https://api.github.com/users/lens0021/subscriptions/)",\"organizations_url\":\"[https://api.github.com/users/lens0021/orgs\](https://api.github.com/users/lens0021/orgs/)",\"repos_url\":\"[https://api.github.com/users/lens0021/repos\](https://api.github.com/users/lens0021/repos/)",\"events_url\":\"[https://api.github.com/users/lens0021/events{/privacy}\](https://api.github.com/users/lens0021/events%7B/privacy%7D/)",\"received_events_url\":\"[https://api.github.com/users/lens0021/received_events\](https://api.github.com/users/lens0021/received_events/)",\"type\":\"User\",\"user_view_type\":\"public\",\"site_admin\":false},\"html_url\":\"[https://github.com/lens0021/declam\](https://github.com/lens0021/declam/)",\"description\":null,\"fork\":false,\"url\":\"[https://api.github.com/repos/lens0021/declam\](https://api.github.com/repos/lens0021/declam/)",\"forks_url\":\"[https://api.github.com/repos/lens0021/declam/forks\](https://api.github.com/repos/lens0021/declam/forks/)",\"keys_url\":\"[https://api.github.com/repos/lens0021/declam/keys{/key_id}\](https://api.github.com/repos/lens0021/declam/keys%7B/key_id%7D/)",\"collaborators_url\":\"[https://api.github.com/repos/lens0021/declam/collaborators{/collaborator}\](https://api.github.com/repos/lens0021/declam/collaborators%7B/collaborator%7D/)",\"teams_url\":\"[https://api.github.com/repos/lens0021/declam/teams\](https://api.github.com/repos/lens0021/declam/teams/)",\"hooks_url\":\"[https://api.github.com/repos/lens0021/declam/hooks\](https://api.github.com/repos/lens0021/declam/hooks/)",\"issue_events_url\":\"[https://api.github.com/repos/lens0021/declam/issues/events{/number}\](https://api.github.com/repos/lens0021/declam/issues/events%7B/number%7D/)",\"events_url\":\"[https://api.github.com/repos/lens0021/declam/events\](https://api.github.com/repos/lens0021/declam/events/)",\"assignees_url\":\"[https://api.github.com/repos/lens0021/declam/assignees{/user}\](https://api.github.com/repos/lens0021/declam/assignees%7B/user%7D/)",\"branches_url\":\"[https://api.github.com/repos/lens0021/declam/branches{/branch}\](https://api.github.com/repos/lens0021/declam/branches%7B/branch%7D/)",\"tags_url\":\"[https://api.github.com/repos/lens0021/declam/tags\](https://api.github.com/repos/lens0021/declam/tags/)",\"blobs_url\":\"[https://api.github.com/repos/lens0021/declam/git/blobs{/sha}\](https://api.github.com/repos/lens0021/declam/git/blobs%7B/sha%7D/)",\"git_tags_url\":\"[https://api.github.com/repos/lens0021/declam/git/tags{/sha}\](https://api.github.com/repos/lens0021/declam/git/tags%7B/sha%7D/)",\"git_refs_url\":\"[https://api.github.com/repos/lens0021/declam/git/refs{/sha}\](https://api.github.com/repos/lens0021/declam/git/refs%7B/sha%7D/)",\"trees_url\":\"[https://api.github.com/repos/lens0021/declam/git/trees{/sha}\](https://api.github.com/repos/lens0021/declam/git/trees%7B/sha%7D/)",\"statuses_url\":\"[https://api.github.com/repos/lens0021/declam/statuses/{sha}\](https://api.github.com/repos/lens0021/declam/statuses/%7Bsha%7D/)",\"languages_url\":\"[https://api.github.com/repos/lens0021/declam/languages\](https://api.github.com/repos/lens0021/declam/languages/)",\"stargazers_url\":\"[https://api.github.com/repos/lens0021/declam/stargazers\](https://api.github.com/repos/lens0021/declam/stargazers/)",\"contributors_url\":\"[https://api.github.com/repos/lens0021/declam/contributors\](https://api.github.com/repos/lens0021/declam/contributors/)",\"subscribers_url\":\"[https://api.github.com/repos/lens0021/declam/subscribers\](https://api.github.com/repos/lens0021/declam/subscribers/)",\"subscription_url\":\"[https://api.github.com/repos/lens0021/declam/subscription\](https://api.github.com/repos/lens0021/declam/subscription/)",\"commits_url\":\"[https://api.github.com/repos/lens0021/declam/commits{/sha}\](https://api.github.com/repos/lens0021/declam/commits%7B/sha%7D/)",\"git_commits_url\":\"[https://api.github.com/repos/lens0021/declam/git/commits{/sha}\](https://api.github.com/repos/lens0021/declam/git/commits%7B/sha%7D/)",\"comments_url\":\"[https://api.github.com/repos/lens0021/declam/comments{/number}\](https://api.github.com/repos/lens0021/declam/comments%7B/number%7D/)",\"issue_comment_url\":\"[https://api.github.com/repos/lens0021/declam/issues/comments{/number}\](https://api.github.com/repos/lens0021/declam/issues/comments%7B/number%7D/)",\"contents_url\":\"[https://api.github.com/repos/lens0021/declam/contents/{+path}\](https://api.github.com/repos/lens0021/declam/contents/%7B+path%7D/)",\"compare_url\":\"[https://api.github.com/repos/lens0021/declam/compare/{base}...{head}\](https://api.github.com/repos/lens0021/declam/compare/%7Bbase%7D...%7Bhead%7D/)",\"merges_url\":\"[https://api.github.com/repos/lens0021/declam/merges\](https://api.github.com/repos/lens0021/declam/merges/)",\"archive_url\":\"[https://api.github.com/repos/lens0021/declam/{archive_format}{/ref}\](https://api.github.com/repos/lens0021/declam/%7Barchive_format%7D%7B/ref%7D/)",\"downloads_url\":\"[https://api.github.com/repos/lens0021/declam/downloads\](https://api.github.com/repos/lens0021/declam/downloads/)",\"issues_url\":\"[https://api.github.com/repos/lens0021/declam/issues{/number}\](https://api.github.com/repos/lens0021/declam/issues%7B/number%7D/)",\"pulls_url\":\"[https://api.github.com/repos/lens0021/declam/pulls{/number}\](https://api.github.com/repos/lens0021/declam/pulls%7B/number%7D/)",\"milestones_url\":\"[https://api.github.com/repos/lens0021/declam/milestones{/number}\](https://api.github.com/repos/lens0021/declam/milestones%7B/number%7D/)",\"notifications_url\":\"[https://api.github.com/repos/lens0021/declam/notifications{?since,all,participating}\](https://api.github.com/repos/lens0021/declam/notifications%7B?since,all,participating}\)",\"labels_url\":\"[https://api.github.com/repos/lens0021/declam/labels{/name}\](https://api.github.com/repos/lens0021/declam/labels%7B/name%7D/)",\"releases_url\":\"[https://api.github.com/repos/lens0021/declam/releases{/id}\](https://api.github.com/repos/lens0021/declam/releases%7B/id%7D/)",\"deployments_url\":\"[https://api.github.com/repos/lens0021/declam/deployments\](https://api.github.com/repos/lens0021/declam/deployments/)",\"created_at\":\"2026-01-11T11:30:15Z\",\"updated_at\":\"2026-01-25T05:23:46Z\",\"pushed_at\":\"2026-01-27T15:30:56Z\",\"git_url\":\"git://github.com/lens0021/declam.git\",\"ssh_url\":\"[email protected]:lens0021/declam.git\",\"clone_url\":\"[https://github.com/lens0021/declam.git\](https://github.com/lens0021/declam.git/)",\"svn_url\":\"[https://github.com/lens0021/declam\](https://github.com/lens0021/declam/)",\"homepage\":\"\",\"size\":32358,\"stargazers_count\":0,\"watchers_count\":0,\"language\":null,\"has_issues\":true,\"has_projects\":false,\"has_downloads\":true,\"has_wiki\":false,\"has_pages\":false,\"has_discussions\":false,\"forks_count\":0,\"mirror_url\":null,\"archived\":false,\"disabled\":false,\"open_issues_count\":5,\"license\":null,\"allow_forking\":true,\"is_template\":false,\"web_commit_signoff_required\":false,\"topics\":[],\"visibility\":\"public\",\"forks\":0,\"open_issues\":5,\"watchers\":0,\"default_branch\":\"main\",\"temp_clone_token\":null,\"network_count\":0,\"subscribers_count\":0}" 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" Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" X-Github-Request-Id=DC40:3A853B:1149A06:4DAEA8B:6978DA63 tf_resource_type=github_repository Last-Modified="Sun, 25 Jan 2026 05:23:46 GMT" X-Frame-Options=deny X-Ratelimit-Resource=core tf_req_id=11c61887-2b9a-6f82-53f2-188a6db39647 Content-Type="application/json; charset=utf-8" X-Github-Api-Version-Selected=2022-11-28 tf_http_op_type=response tf_http_res_status_reason="200 OK" Accept-Ranges=bytes Cache-Control="public, max-age=60, s-maxage=60" Date="Tue, 27 Jan 2026 15:31:47 GMT" X-Ratelimit-Remaining=55 X-Ratelimit-Reset=1769528508 @module=provider Access-Control-Allow-Origin="*" Etag="W/\"beacf53f6776b2d5fbdd7741df380c3e349121f18092efa483dee23c8bc55650\"" tf_http_res_status_code=200 tf_rpc=ReadResource timestamp=2026-01-27T15:31:47.376Z
    2026-01-27T15:31:47.378Z [DEBUG] provider.terraform-provider-github: Sending HTTP Request: Accept-Encoding=gzip User-Agent=go-github/v81.0.0 tf_req_id=11c61887-2b9a-6f82-53f2-188a6db39647 tf_http_req_body="" tf_http_req_uri=/repos/lens0021/declam/vulnerability-alerts @module=provider Accept="application/vnd.github.dorian-preview+json,application/vnd.github.stone-crop-preview+json" X-Github-Api-Version=2022-11-28 tf_http_op_type=request tf_http_req_method=GET tf_provider_addr=provider tf_resource_type=github_repository tf_rpc=ReadResource @caller=/tmp/terraform-provider-github/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging_http_transport.go:162 Host=api.github.com tf_http_req_version=HTTP/1.1 tf_http_trans_id=80152a57-9545-05ca-3ef8-fa613d712f7a timestamp=2026-01-27T15:31:47.378Z
    2026-01-27T15:31:47.417Z [DEBUG] provider.terraform-provider-github: Received HTTP Response: Server=github.com @module=provider X-Ratelimit-Used=6 X-Xss-Protection=0 tf_http_op_type=response X-Ratelimit-Reset=1769528508
      tf_http_res_body=
      | {\r
      |   "message": "Requires authentication",\r
      |   "documentation_url": "https://docs.github.com/rest",\r
      |   "status": "401"\r
      | }
       tf_http_res_status_code=401 tf_http_res_version=HTTP/2.0 Date="Tue, 27 Jan 2026 15:31:47 GMT" X-Github-Request-Id=DC40:3A853B:1149AEF:4DAEEA6:6978DA63 @caller=/tmp/terraform-provider-github/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging_http_transport.go:162 X-Github-Media-Type="github.v3; format=json" X-Ratelimit-Limit=60 X-Ratelimit-Remaining=54 X-Ratelimit-Resource=core Access-Control-Allow-Origin="*" 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" X-Content-Type-Options=nosniff tf_provider_addr=provider tf_req_id=11c61887-2b9a-6f82-53f2-188a6db39647 tf_resource_type=github_repository Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" Vary="Accept-Encoding, Accept, X-Requested-With" Content-Length=120 Content-Type="application/json; charset=utf-8" X-Frame-Options=deny Content-Security-Policy="default-src 'none'" Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" tf_http_res_status_reason="401 Unauthorized" tf_http_trans_id=80152a57-9545-05ca-3ef8-fa613d712f7a tf_rpc=ReadResource timestamp=2026-01-27T15:31:47.417Z
    Error: -27T15:31:47.418Z [ERROR] provider.terraform-provider-github: Response contains error diagnostic: tf_rpc=ReadResource @caller=/tmp/terraform-provider-github/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_detail="" diagnostic_severity=ERROR tf_req_id=11c61887-2b9a-6f82-53f2-188a6db39647 tf_resource_type=github_repository diagnostic_summary="error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []" tf_proto_version=5.10 tf_provider_addr=provider timestamp=2026-01-27T15:31:47.417Z
    Error: -27T15:31:47.418Z [ERROR] vertex "github_repository.this" error: error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []
    Error: -27T15:31:47.418Z [ERROR] vertex "github_repository.this (expand)" error: error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []
    2026-01-27T15:31:47.419Z [INFO]  backend/local: plan operation completed
    
    Error: error reading repository vulnerability alerts: GET https://api.github.com/repos/lens0021/declam/vulnerability-alerts: 401 Requires authentication []
    
    2026-01-27T15:31:47.420Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
    
    Planning failed. OpenTofu encountered an error while generating this plan.
    
    2026-01-27T15:31:47.421Z [INFO]  provider: plugin process exited: plugin=/home/runner/work/declam/declam/.github/tf/terraform-provider-github id=5187
    2026-01-27T15:31:47.421Z [DEBUG] provider: plugin exited
    Error: OpenTofu exited with code 1.
    Error: Process completed with exit code 1.
    

  10. stevehipwell commented on Jan 27, 2026

    @stevehipwell
    Collaborator

    @lens0021 thanks for the detailed test. Could you try again with the latest code on that PR it should be fixed now.

  11. lens0021 commented on Jan 27, 2026

    @lens0021
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions