terraform-provider-github: Changing `auto` init value should not force a repo to be destroy/created
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:
terraform planterraform apply- make changes to flip
auto_initvalue terraform plan
References
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 12
- Comments: 17 (12 by maintainers)
Commits related to this issue
- Update github_repository docs After PR #135, auto_init, license_template, and gitignore_template now all have ForceNew set to true, which means they *will* affect the resource after initial creation.... — committed to jordane/terraform-provider-github by jordane 5 years ago
- Update github_repository docs After PR #135, auto_init, license_template, and gitignore_template now all have ForceNew set to true, which means they *will* affect the resource after initial creation.... — committed to kfcampbell/terraform-provider-github by jordane 5 years ago
@radeksimko @paultyng @tracypholmes any update/feedback? I would like to make a PR to fix this but wanted to see if it would be accepted beforehand since there was some controversy around this.
I’m also experiencing this issue. I think it was not like this in the previous provider version I just checked that this is not the case in provider version 1.1.0 with this issue it’s basically impossible to import repositories
FWIW, the same problem exists for setting a template on an imported repo. While only relevant during creation, having a template on an imported repo causes the provider to want to re-create the repository based on the template.