Expected Behavior
The "description" repository field should not be modified if it is absent in resource
Actual Behavior
The description is removed
Terraform Version
Terraform v1.14.6
on darwin_arm64
- provider registry.terraform.io/integrations/github v6.11.1
Affected Resource(s)
Terraform Configuration Files
terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 6.0"
}
}
}
provider "github" {
# token = var.github_token # or set GITHUB_TOKEN env var
# owner = var.owner # or set GITHUB_OWNER env var
}
resource "github_repository" "example" {
name = "my-test-repo"
description = "Some description"
visibility = "public"
}
Steps to Reproduce
- terraform apply number 1 --> repository is created
- Remove description line from resource definition
- terraform apply number 2 --> repository description is removed from repository
Debug Output
$ terraform apply
github_repository.example: Refreshing state... [id=my-test-repo]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# github_repository.example will be updated in-place
~ resource "github_repository" "example" {
- description = "Some description" -> null
id = "my-test-repo"
name = "my-test-repo"
# (39 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
github_repository.example: Modifying... [id=my-test-repo]
github_repository.example: Modifications complete after 2s [id=my-test-repo]
Panic Output
Code of Conduct
Expected Behavior
The "description" repository field should not be modified if it is absent in resource
Actual Behavior
The description is removed
Terraform Version
Terraform v1.14.6
on darwin_arm64
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
Debug Output
Panic Output
Code of Conduct