Skip to content

[BUG]: Plan incorrectly proposes change for repository ruleset code scanning results #2556

@chris3ware

Description

@chris3ware

Expected Behavior

required_code_scanning blocks added to github_repository_ruleset resources should not produce a plan with changes after they have been applied.

Actual Behavior

required_code_scanning blocks added to github_repository_ruleset are producing changes on plans after they have been applied.

Terraform Version

tofu version
OpenTofu v1.9.0
on darwin_arm64

  • provider registry.opentofu.org/carlpett/sops v1.1.1
  • provider registry.opentofu.org/integrations/github v6.5.0

Affected Resource(s)

github_repository_ruleset

Terraform Configuration Files

terraform {
  required_version = ">=1.9.0, <2.0.0"
  required_providers {
    github = {
      source  = "integrations/github"
      version = "~> 6.5.0"
    }
  }
}

resource "github_repository" "example" {
  name = "example"
  description = "Test for code scan"
}

resource "github_repository_ruleset" "example" {
  name        = "test"
  repository  = github_repository.example.name
  target      = "branch"
  enforcement = "active"

  rules {
    required_code_scanning {
      required_code_scanning_tool {
        alerts_threshold          = "errors_and_warnings"
        security_alerts_threshold = "high_or_higher"
        tool                      = "Scorecard"
      }
    }
  }
}

Steps to Reproduce

  • Add the example configuration to a terraform file
  • Run tofu plan and tofu apply to create the repository and the ruleset
  • Verify that the resources have been created with the github cli / ui. For example:
gh api \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/OWNER/REPO/rulesets/RULESET_ID

Example output:

{
  "id": 3571534,
  "name": "test",
  "target": "branch",
  "source_type": "Repository",
  "source": "chris3ware/example",
  "enforcement": "active",
  "conditions": {},
  "rules": [
    {
      "type": "code_scanning",
      "parameters": {
        "code_scanning_tools": [
          {
            "tool": "Scorecard",
            "security_alerts_threshold": "high_or_higher",
            "alerts_threshold": "errors_and_warnings"
          }
        ]
      }
    }
  ],
  "node_id": "RRS_lACqUmVwb3NpdG9yec43TMv2zgA2f04",
  "created_at": "2025-02-05T14:32:42.250+00:00",
  "updated_at": "2025-02-05T14:32:42.250+00:00",
  "bypass_actors": [],
  "current_user_can_bypass": "never",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/chris3ware/example/rulesets/3571534"
    },
    "html": {
      "href": "https://github.com/chris3ware/example/rules/3571534"
    }
  }
}
  • Run tofu plan again to see that changes are proposed for the code scanning results

  • Run tofu state show github_repository_ruleset.example to see that the required_code_scanning block is not present in the state file:

resource "github_repository_ruleset" "example" {
    enforcement = "active"
    etag        = "W/\"5c70184c8baa792dbd0c668a9dd1881b6e9d7649cd0d0379c9da870ef44d2ce5\""
    id          = "3571534"
    name        = "test"
    node_id     = "RRS_lACqUmVwb3NpdG9yec43TMv2zgA2f04"
    repository  = "example"
    ruleset_id  = 3571534
    target      = "branch"

    rules {
    }
}

Debug Output

2025-02-05T14:56:25.682Z [INFO]  OpenTofu version: 1.9.0
2025-02-05T14:56:25.682Z [DEBUG] using github.com/hashicorp/go-tfe v1.36.0
2025-02-05T14:56:25.683Z [DEBUG] using github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52
2025-02-05T14:56:25.683Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2025-02-05T14:56:25.683Z [DEBUG] using github.com/zclconf/go-cty v1.14.4
2025-02-05T14:56:25.683Z [INFO]  Go runtime version: go1.23.4
2025-02-05T14:56:25.683Z [INFO]  CLI args: []string{"tofu", "apply"}
2025-02-05T14:56:25.683Z [DEBUG] Attempting to open CLI config file: /Users/chris/.config/opentofu/tofurc
2025-02-05T14:56:25.683Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2025-02-05T14:56:25.683Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2025-02-05T14:56:25.683Z [DEBUG] ignoring non-existing provider search directory /Users/chris/.terraform.d/plugins
2025-02-05T14:56:25.683Z [DEBUG] ignoring non-existing provider search directory /Users/chris/.local/share/opentofu/plugins
2025-02-05T14:56:25.683Z [DEBUG] ignoring non-existing provider search directory /Users/chris/Library/Application Support/io.terraform/plugins
2025-02-05T14:56:25.683Z [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2025-02-05T14:56:25.683Z [DEBUG] Found the config directory: /Users/chris/.terraform.d
2025-02-05T14:56:25.683Z [INFO]  CLI command args: []string{"apply"}
2025-02-05T14:56:25.684Z [DEBUG] New state was assigned lineage "d4d4e17b-6cd7-1df0-6b16-69c73141dbc6"
2025-02-05T14:56:25.696Z [DEBUG] checking for provisioner in "."
2025-02-05T14:56:25.697Z [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2025-02-05T14:56:25.700Z [INFO]  backend/local: starting Apply operation
2025-02-05T14:56:25.704Z [DEBUG] created provider logger: level=debug
2025-02-05T14:56:25.704Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:56:25.714Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:56:25.715Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13757
2025-02-05T14:56:25.715Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:56:25.727Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:56:25.727Z
2025-02-05T14:56:25.733Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:56:25.733Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin3268603427 network=unix timestamp=2025-02-05T14:56:25.733Z
2025-02-05T14:56:25.749Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:56:25.749Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13757
2025-02-05T14:56:25.749Z [DEBUG] provider: plugin exited
2025-02-05T14:56:25.750Z [DEBUG] Building and walking validate graph
2025-02-05T14:56:25.751Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:25.751Z [DEBUG] ProviderTransformer: "github_repository.example" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:25.752Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: [github_repository.example]
2025-02-05T14:56:25.752Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:56:25.752Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:56:25.752Z [DEBUG] Starting graph walk: walkValidate
2025-02-05T14:56:25.755Z [DEBUG] created provider logger: level=debug
2025-02-05T14:56:25.755Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:56:25.758Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:56:25.759Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13758
2025-02-05T14:56:25.759Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:56:25.765Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:56:25.765Z
2025-02-05T14:56:25.771Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:56:25.771Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin2537951600 network=unix timestamp=2025-02-05T14:56:25.771Z
2025-02-05T14:56:25.781Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:56:25.781Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13758
2025-02-05T14:56:25.781Z [DEBUG] provider: plugin exited
2025-02-05T14:56:25.782Z [INFO]  backend/local: apply calling Plan
2025-02-05T14:56:25.782Z [DEBUG] Building and walking plan graph for NormalMode
2025-02-05T14:56:25.782Z [DEBUG] ProviderTransformer: "github_repository.example (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:25.782Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:25.782Z [DEBUG] ReferenceTransformer: "github_repository.example (expand)" references: []
2025-02-05T14:56:25.782Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example (expand)" references: [github_repository.example (expand)]
2025-02-05T14:56:25.782Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:56:25.782Z [DEBUG] Starting graph walk: walkPlan
2025-02-05T14:56:25.783Z [DEBUG] created provider logger: level=debug
2025-02-05T14:56:25.783Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:56:25.785Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:56:25.786Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13759
2025-02-05T14:56:25.786Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:56:25.792Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:56:25.792Z
2025-02-05T14:56:25.798Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:56:25.798Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin2735857912 network=unix timestamp=2025-02-05T14:56:25.798Z
2025-02-05T14:56:25.803Z [WARN]  ValidateProviderConfig from "provider[\"registry.opentofu.org/integrations/github\"]" changed the config value, but that value is unused
2025-02-05T14:56:25.804Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [INFO] Selecting owner  from GITHUB_OWNER environment variable: timestamp=2025-02-05T14:56:25.804Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [INFO] Using the token from GitHub CLI: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [INFO] Setting write_delay_ms to 1000: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [DEBUG] Setting read_delay_ms to 0: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [DEBUG] Setting retry_delay_ms to 0: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [DEBUG] Setting max_retries to 3: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:25.939Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:25 [DEBUG] Setting parallel_requests to false: timestamp=2025-02-05T14:56:25.939Z
2025-02-05T14:56:26.181Z [DEBUG] Resource instance state not found for node "github_repository.example", instance github_repository.example
2025-02-05T14:56:26.181Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:56:26.182Z [DEBUG] refresh: github_repository.example: no state, so not refreshing
2025-02-05T14:56:26.193Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .squash_merge_commit_title: planned value cty.StringVal("COMMIT_OR_PR_TITLE") for a non-computed attribute
      - .allow_rebase_merge: planned value cty.True for a non-computed attribute
      - .merge_commit_message: planned value cty.StringVal("PR_TITLE") for a non-computed attribute
      - .squash_merge_commit_message: planned value cty.StringVal("COMMIT_MESSAGES") for a non-computed attribute
      - .allow_merge_commit: planned value cty.True for a non-computed attribute
      - .web_commit_signoff_required: planned value cty.False for a non-computed attribute
      - .allow_squash_merge: planned value cty.True for a non-computed attribute
      - .delete_branch_on_merge: planned value cty.False for a non-computed attribute
      - .merge_commit_title: planned value cty.StringVal("MERGE_MESSAGE") for a non-computed attribute
      - .allow_auto_merge: planned value cty.False for a non-computed attribute
      - .archived: planned value cty.False for a non-computed attribute
      - .security_and_analysis: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
2025-02-05T14:56:26.194Z [DEBUG] Resource instance state not found for node "github_repository_ruleset.example", instance github_repository_ruleset.example
2025-02-05T14:56:26.194Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: []
2025-02-05T14:56:26.195Z [DEBUG] refresh: github_repository_ruleset.example: no state, so not refreshing
2025-02-05T14:56:26.200Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository_ruleset.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .rules[0].update_allows_fetch_and_merge: planned value cty.False for a non-computed attribute
2025-02-05T14:56:26.201Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:56:26.202Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13759
2025-02-05T14:56:26.202Z [DEBUG] provider: plugin exited
2025-02-05T14:56:26.202Z [DEBUG] building apply graph to check for errors
2025-02-05T14:56:26.203Z [DEBUG] Resource state not found for node "github_repository.example", instance github_repository.example
2025-02-05T14:56:26.203Z [DEBUG] Resource state not found for node "github_repository_ruleset.example", instance github_repository_ruleset.example
2025-02-05T14:56:26.203Z [DEBUG] ProviderTransformer: "github_repository.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:26.203Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:26.203Z [DEBUG] ProviderTransformer: "github_repository.example" (*tofu.NodeApplyableResourceInstance) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:26.203Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example" (*tofu.NodeApplyableResourceInstance) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:26.203Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:56:26.203Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: [github_repository.example github_repository.example github_repository.example (expand)]
2025-02-05T14:56:26.203Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:56:26.203Z [DEBUG] ReferenceTransformer: "github_repository.example (expand)" references: []
2025-02-05T14:56:26.204Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example (expand)" references: [github_repository.example github_repository.example github_repository.example (expand)]
2025-02-05T14:56:26.208Z [DEBUG] command: asking for input: "\nDo you want to perform these actions?"
2025-02-05T14:56:27.875Z [INFO]  backend/local: apply calling Apply
2025-02-05T14:56:27.875Z [DEBUG] Building and walking apply graph for NormalMode plan
2025-02-05T14:56:27.876Z [DEBUG] Resource state not found for node "github_repository.example", instance github_repository.example
2025-02-05T14:56:27.876Z [DEBUG] Resource state not found for node "github_repository_ruleset.example", instance github_repository_ruleset.example
2025-02-05T14:56:27.876Z [DEBUG] ProviderTransformer: "github_repository.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:27.876Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:27.876Z [DEBUG] ProviderTransformer: "github_repository.example" (*tofu.NodeApplyableResourceInstance) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:27.876Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example" (*tofu.NodeApplyableResourceInstance) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:56:27.877Z [DEBUG] ReferenceTransformer: "github_repository.example (expand)" references: []
2025-02-05T14:56:27.877Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example (expand)" references: [github_repository.example (expand) github_repository.example github_repository.example]
2025-02-05T14:56:27.877Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:56:27.878Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: [github_repository.example (expand) github_repository.example github_repository.example]
2025-02-05T14:56:27.878Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:56:27.880Z [DEBUG] Starting graph walk: walkApply
2025-02-05T14:56:27.881Z [DEBUG] created provider logger: level=debug
2025-02-05T14:56:27.882Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:56:27.890Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:56:27.893Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13770
2025-02-05T14:56:27.893Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:56:27.908Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:56:27.907Z
2025-02-05T14:56:27.918Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin2844226778 network=unix timestamp=2025-02-05T14:56:27.918Z
2025-02-05T14:56:27.918Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:56:27.926Z [WARN]  ValidateProviderConfig from "provider[\"registry.opentofu.org/integrations/github\"]" changed the config value, but that value is unused
2025-02-05T14:56:27.926Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [INFO] Selecting owner  from GITHUB_OWNER environment variable: timestamp=2025-02-05T14:56:27.926Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [INFO] Using the token from GitHub CLI: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [INFO] Setting write_delay_ms to 1000: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [DEBUG] Setting read_delay_ms to 0: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [DEBUG] Setting retry_delay_ms to 0: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [DEBUG] Setting max_retries to 3: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:27.995Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:27 [DEBUG] Setting parallel_requests to false: timestamp=2025-02-05T14:56:27.995Z
2025-02-05T14:56:28.179Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .squash_merge_commit_message: planned value cty.StringVal("COMMIT_MESSAGES") for a non-computed attribute
      - .allow_merge_commit: planned value cty.True for a non-computed attribute
      - .web_commit_signoff_required: planned value cty.False for a non-computed attribute
      - .allow_squash_merge: planned value cty.True for a non-computed attribute
      - .delete_branch_on_merge: planned value cty.False for a non-computed attribute
      - .merge_commit_title: planned value cty.StringVal("MERGE_MESSAGE") for a non-computed attribute
      - .allow_auto_merge: planned value cty.False for a non-computed attribute
      - .archived: planned value cty.False for a non-computed attribute
      - .merge_commit_message: planned value cty.StringVal("PR_TITLE") for a non-computed attribute
      - .squash_merge_commit_title: planned value cty.StringVal("COMMIT_OR_PR_TITLE") for a non-computed attribute
      - .allow_rebase_merge: planned value cty.True for a non-computed attribute
      - .security_and_analysis: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
2025-02-05T14:56:28.180Z [INFO]  Starting apply for github_repository.example
2025-02-05T14:56:28.180Z [DEBUG] github_repository.example: applying the planned Create change
2025-02-05T14:56:28.181Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:28 [DEBUG] setting computed for "security_and_analysis" from ComputedKeys: timestamp=2025-02-05T14:56:28.181Z
2025-02-05T14:56:28.181Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:28 [DEBUG] setting computed for "topics" from ComputedKeys: timestamp=2025-02-05T14:56:28.181Z
2025-02-05T14:56:29.169Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:29 [DEBUG] No security_and_analysis update required. Removing this field from the payload.: timestamp=2025-02-05T14:56:29.169Z
2025-02-05T14:56:29.169Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:29 [DEBUG] Sleeping 1s between operations: timestamp=2025-02-05T14:56:29.169Z
2025-02-05T14:56:30.500Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:30 [DEBUG] No visibility update required. visibility:: timestamp=2025-02-05T14:56:30.500Z
2025-02-05T14:56:30.500Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:30 [DEBUG] No privacy update required. private: false: timestamp=2025-02-05T14:56:30.500Z
2025-02-05T14:56:30.500Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:30 [DEBUG] Sleeping 1s between operations: timestamp=2025-02-05T14:56:30.500Z
2025-02-05T14:56:31.865Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an unexpected new value for github_repository.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .allow_update_branch: was null, but now cty.False
      - .has_wiki: was null, but now cty.False
      - .has_projects: was null, but now cty.False
      - .vulnerability_alerts: was null, but now cty.False
      - .is_template: was null, but now cty.False
      - .has_discussions: was null, but now cty.False
      - .has_downloads: was null, but now cty.False
      - .has_issues: was null, but now cty.False
      - .homepage_url: was null, but now cty.StringVal("")
2025-02-05T14:56:31.866Z [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2025-02-05T14:56:31.872Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository_ruleset.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .rules[0].update_allows_fetch_and_merge: planned value cty.False for a non-computed attribute
2025-02-05T14:56:31.873Z [INFO]  Starting apply for github_repository_ruleset.example
2025-02-05T14:56:31.874Z [DEBUG] github_repository_ruleset.example: applying the planned Create change
2025-02-05T14:56:32.340Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:56:32 [DEBUG] Sleeping 1s between operations: timestamp=2025-02-05T14:56:32.340Z
2025-02-05T14:56:33.508Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an unexpected new value for github_repository_ruleset.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .rules[0].update_allows_fetch_and_merge: was cty.False, but now null
2025-02-05T14:56:33.509Z [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2025-02-05T14:56:33.510Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:56:33.513Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=13770
2025-02-05T14:56:33.513Z [DEBUG] provider: plugin exited
2025-02-05T14:57:40.416Z [INFO]  OpenTofu version: 1.9.0
2025-02-05T14:57:40.416Z [DEBUG] using github.com/hashicorp/go-tfe v1.36.0
2025-02-05T14:57:40.416Z [DEBUG] using github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52
2025-02-05T14:57:40.416Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2025-02-05T14:57:40.416Z [DEBUG] using github.com/zclconf/go-cty v1.14.4
2025-02-05T14:57:40.416Z [INFO]  Go runtime version: go1.23.4
2025-02-05T14:57:40.416Z [INFO]  CLI args: []string{"tofu", "plan", "-detailed-exitcode"}
2025-02-05T14:57:40.416Z [DEBUG] Attempting to open CLI config file: /Users/chris/.config/opentofu/tofurc
2025-02-05T14:57:40.416Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2025-02-05T14:57:40.417Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2025-02-05T14:57:40.417Z [DEBUG] ignoring non-existing provider search directory /Users/chris/.terraform.d/plugins
2025-02-05T14:57:40.417Z [DEBUG] ignoring non-existing provider search directory /Users/chris/.local/share/opentofu/plugins
2025-02-05T14:57:40.417Z [DEBUG] ignoring non-existing provider search directory /Users/chris/Library/Application Support/io.terraform/plugins
2025-02-05T14:57:40.417Z [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2025-02-05T14:57:40.417Z [DEBUG] Found the config directory: /Users/chris/.terraform.d
2025-02-05T14:57:40.417Z [INFO]  CLI command args: []string{"plan", "-detailed-exitcode"}
2025-02-05T14:57:40.423Z [DEBUG] New state was assigned lineage "05e2b3e3-e699-b283-fe58-c66068c9bdf0"
2025-02-05T14:57:40.445Z [DEBUG] checking for provisioner in "."
2025-02-05T14:57:40.446Z [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2025-02-05T14:57:40.452Z [INFO]  backend/local: starting Plan operation
2025-02-05T14:57:40.457Z [DEBUG] created provider logger: level=debug
2025-02-05T14:57:40.457Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:57:40.465Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:57:40.467Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14285
2025-02-05T14:57:40.467Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:57:40.478Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:57:40.478Z
2025-02-05T14:57:40.484Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:57:40.484Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin2227612995 network=unix timestamp=2025-02-05T14:57:40.484Z
2025-02-05T14:57:40.501Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:57:40.503Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14285
2025-02-05T14:57:40.503Z [DEBUG] provider: plugin exited
2025-02-05T14:57:40.503Z [DEBUG] Building and walking validate graph
2025-02-05T14:57:40.504Z [DEBUG] ProviderTransformer: "github_repository.example" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:40.504Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:40.505Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:57:40.505Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: [github_repository.example]
2025-02-05T14:57:40.505Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:57:40.505Z [DEBUG] Starting graph walk: walkValidate
2025-02-05T14:57:40.508Z [DEBUG] created provider logger: level=debug
2025-02-05T14:57:40.508Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:57:40.510Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:57:40.511Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14286
2025-02-05T14:57:40.511Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:57:40.518Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:57:40.518Z
2025-02-05T14:57:40.523Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:57:40.523Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin3231753399 network=unix timestamp=2025-02-05T14:57:40.523Z
2025-02-05T14:57:40.533Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:57:40.534Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14286
2025-02-05T14:57:40.534Z [DEBUG] provider: plugin exited
2025-02-05T14:57:40.534Z [INFO]  backend/local: plan calling Plan
2025-02-05T14:57:40.534Z [DEBUG] Building and walking plan graph for NormalMode
2025-02-05T14:57:40.535Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:40.535Z [DEBUG] ProviderTransformer: "github_repository.example (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:40.535Z [DEBUG] ReferenceTransformer: "github_repository.example (expand)" references: []
2025-02-05T14:57:40.535Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example (expand)" references: [github_repository.example (expand)]
2025-02-05T14:57:40.535Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:57:40.535Z [DEBUG] Starting graph walk: walkPlan
2025-02-05T14:57:40.535Z [DEBUG] created provider logger: level=debug
2025-02-05T14:57:40.535Z [INFO]  provider: configuring client automatic mTLS
2025-02-05T14:57:40.537Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 args=[".terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0"]
2025-02-05T14:57:40.538Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14287
2025-02-05T14:57:40.539Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0
2025-02-05T14:57:40.545Z [INFO]  provider.terraform-provider-github_v6.5.0: configuring server automatic mTLS: timestamp=2025-02-05T14:57:40.544Z
2025-02-05T14:57:40.550Z [DEBUG] provider: using plugin: version=5
2025-02-05T14:57:40.550Z [DEBUG] provider.terraform-provider-github_v6.5.0: plugin address: network=unix address=/var/folders/nk/q4862qt551779kn84k5z50vw0000gn/T/plugin4060430694 timestamp=2025-02-05T14:57:40.550Z
2025-02-05T14:57:40.556Z [WARN]  ValidateProviderConfig from "provider[\"registry.opentofu.org/integrations/github\"]" changed the config value, but that value is unused
2025-02-05T14:57:40.556Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [INFO] Selecting owner  from GITHUB_OWNER environment variable: timestamp=2025-02-05T14:57:40.556Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [INFO] Using the token from GitHub CLI: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [INFO] Setting write_delay_ms to 1000: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [DEBUG] Setting read_delay_ms to 0: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [DEBUG] Setting retry_delay_ms to 0: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [DEBUG] Setting max_retries to 3: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.726Z [INFO]  provider.terraform-provider-github_v6.5.0: 2025/02/05 14:57:40 [DEBUG] Setting parallel_requests to false: timestamp=2025-02-05T14:57:40.726Z
2025-02-05T14:57:40.918Z [DEBUG] ReferenceTransformer: "github_repository.example" references: []
2025-02-05T14:57:41.122Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .allow_rebase_merge: planned value cty.True for a non-computed attribute
      - .delete_branch_on_merge: planned value cty.False for a non-computed attribute
      - .is_template: planned value cty.False for a non-computed attribute
      - .has_discussions: planned value cty.False for a non-computed attribute
      - .homepage_url: planned value cty.StringVal("") for a non-computed attribute
      - .squash_merge_commit_title: planned value cty.StringVal("COMMIT_OR_PR_TITLE") for a non-computed attribute
      - .allow_squash_merge: planned value cty.True for a non-computed attribute
      - .allow_update_branch: planned value cty.False for a non-computed attribute
      - .has_issues: planned value cty.False for a non-computed attribute
      - .allow_merge_commit: planned value cty.True for a non-computed attribute
      - .archived: planned value cty.False for a non-computed attribute
      - .has_downloads: planned value cty.False for a non-computed attribute
      - .squash_merge_commit_message: planned value cty.StringVal("COMMIT_MESSAGES") for a non-computed attribute
      - .vulnerability_alerts: planned value cty.False for a non-computed attribute
      - .has_projects: planned value cty.False for a non-computed attribute
      - .merge_commit_message: planned value cty.StringVal("PR_TITLE") for a non-computed attribute
      - .has_wiki: planned value cty.False for a non-computed attribute
      - .merge_commit_title: planned value cty.StringVal("MERGE_MESSAGE") for a non-computed attribute
      - .allow_auto_merge: planned value cty.False for a non-computed attribute
      - .web_commit_signoff_required: planned value cty.False for a non-computed attribute
      - .security_and_analysis: block count in plan (1) disagrees with count in config (0)
2025-02-05T14:57:41.124Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: []
2025-02-05T14:57:41.309Z [WARN]  Provider "registry.opentofu.org/integrations/github" produced an unexpected new value for github_repository_ruleset.example during refresh.
      - .rules[0].non_fast_forward: was null, but now cty.False
      - .rules[0].required_linear_history: was null, but now cty.False
      - .rules[0].required_signatures: was null, but now cty.False
      - .rules[0].update: was null, but now cty.False
      - .rules[0].update_allows_fetch_and_merge: was null, but now cty.False
      - .rules[0].creation: was null, but now cty.False
      - .rules[0].deletion: was null, but now cty.False
2025-02-05T14:57:41.316Z [WARN]  Provider "provider[\"registry.opentofu.org/integrations/github\"]" produced an invalid plan for github_repository_ruleset.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .rules[0].non_fast_forward: planned value cty.False for a non-computed attribute
      - .rules[0].required_linear_history: planned value cty.False for a non-computed attribute
      - .rules[0].required_signatures: planned value cty.False for a non-computed attribute
      - .rules[0].update: planned value cty.False for a non-computed attribute
      - .rules[0].update_allows_fetch_and_merge: planned value cty.False for a non-computed attribute
      - .rules[0].creation: planned value cty.False for a non-computed attribute
      - .rules[0].deletion: planned value cty.False for a non-computed attribute
2025-02-05T14:57:41.317Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-05T14:57:41.319Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/integrations/github/6.5.0/darwin_arm64/terraform-provider-github_v6.5.0 pid=14287
2025-02-05T14:57:41.319Z [DEBUG] provider: plugin exited
2025-02-05T14:57:41.321Z [DEBUG] building apply graph to check for errors
2025-02-05T14:57:41.322Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:41.322Z [DEBUG] ProviderTransformer: "github_repository.example (expand)" (*tofu.nodeExpandApplyableResource) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:41.322Z [DEBUG] ProviderTransformer: "github_repository_ruleset.example" (*tofu.NodeApplyableResourceInstance) needs provider["registry.opentofu.org/integrations/github"]
2025-02-05T14:57:41.323Z [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/integrations/github\"]" references: []
2025-02-05T14:57:41.323Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example (expand)" references: [github_repository.example (expand)]
2025-02-05T14:57:41.323Z [DEBUG] ReferenceTransformer: "github_repository.example (expand)" references: []
2025-02-05T14:57:41.323Z [DEBUG] ReferenceTransformer: "github_repository_ruleset.example" references: [github_repository.example (expand)]
2025-02-05T14:57:41.323Z [INFO]  backend/local: plan operation completed

Panic Output

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions