Skip to content

Changing auto init value should not force a repo to be destroy/created #155

@majormoses

Description

@majormoses

Terraform Version

$ terraform --version
Terraform v0.11.7

Your version of Terraform is out of date! The latest version
is 0.11.8. You can update by downloading from www.terraform.io/downloads.html

Plugin version 1.3

Affected Resource(s)

Please list the resources as a list, for example:

  • github_repository

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "github_repository" "example" {
  name        = "example"
  description = "My awesome codebase"
  auto_init = false

  private = true
}
resource "github_repository" "example" {
  name        = "example"
  description = "My awesome codebase"
  auto_init = true

  private = true
}

Expected Behavior

auto_init: (Optional) Meaningful only during create; set to true to produce an initial commit in the repository.

To me this should mean that changes to this should ignore any changes. I found in my org that it was something that we used to also toggle branch protection count.

It should ideally note that there was a change but not actually send that request as it does not make sense that someone accidentally or intentionally flipping the value would blow up their code base.

Actual Behavior

marks the resource for deletion/creation

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan
  2. terraform apply
  3. make changes to flip auto_init value
  4. terraform plan

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: SupportAny questions, information, or general needs around the SDK or GitHub APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions