Skip to content

[BUG]: 403 failure results in mismatched state #3142

@LConn-Insight

Description

@LConn-Insight

Expected Behavior

Expected GitHub pages to be appropriately applied per the terraform plan.

Image

Actual Behavior

On an initial deployment for a GitHub Page, the terraform apply failed due to our GitHub app not having the appropriate permissions.

Image

After fixing the permissions and rerunning the same workflow, the terraform plan no longer found any changes that needed to be applied. The screenshot above shows the original plan, and the second there were no changes for the github_repository.module. It's as if the first run somehow modified the state to show that a page was actually created, even though it failed. Visiting the GitHub repo settings showed that a page had not been created.

Even after manually creating the page, the terraform plan was still not picking up any changes.

It seems like there's some motivation to refactor pages into its own resource on #3133, #2087, and #1913.

Terraform Version

= 1.7

Affected Resource(s)

  • github_repository.module.pages

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

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