Skip to content

[BUG]: Changes made to repository's Github Pages configuration outside Terraform are not detected on terraform refresh #1913

@calebworks

Description

@calebworks

Expected Behavior

If a github_repository resource has the pages block configured and deployed, but then the repository's Github Pages configuration is subsequently changed outside of Terraform, the Github Terraform provider should detect those changes on the next terraform plan/terraform apply/terraform refresh and update the underlying resource's configuration to what's reflected in the Terraform template.

Actual Behavior

If changes to a repository's Pages configuration are made outside Terraform those changes are not detected in the next terraform plan/terraform apply/terraform refresh and instead shows the following output:

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Terraform Version

Terraform v1.5.7
on darwin_amd64

  • provider registry.terraform.io/integrations/github v5.37.0

Affected Resource(s)

github_repository

Terraform Configuration Files

resource "github_repository" "main" {
  name      = "test-repo"
  auto_init = true

  pages {
    source {
      branch = "master"
      path   = "/docs"
    }
  }
}

Steps to Reproduce

  1. Deploy the github_repository resource shown above, which will enable Github Pages
  2. In the Github console, change one or more of the Github Pages configuration items specified in the deployed Terraform resource
  3. Run terraform apply
  4. Observe the No changes. Your infrastructure matches the configuration output.

Debug Output

No response

Panic Output

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleUsed by stalebot to clean houseStatus: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedhacktoberfestIssues for participation in Hacktoberfest

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions