Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/github_repository: Avoid spurious diff for topics #138

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

radeksimko
Copy link
Contributor

Topics don't really have an order, so they should be a set, not a list.

This will avoid spurious diff when they're not in alphabetical order (which is common case when you combine two or more variables).

TF_ACC=1 go test ./github -v -run=TestAccGithubRepository_ -timeout 120m
=== RUN   TestAccGithubRepository_basic
--- PASS: TestAccGithubRepository_basic (5.29s)
=== RUN   TestAccGithubRepository_archive
--- PASS: TestAccGithubRepository_archive (3.27s)
=== RUN   TestAccGithubRepository_archiveUpdate
--- PASS: TestAccGithubRepository_archiveUpdate (4.93s)
=== RUN   TestAccGithubRepository_importBasic
--- PASS: TestAccGithubRepository_importBasic (2.99s)
=== RUN   TestAccGithubRepository_defaultBranch
--- PASS: TestAccGithubRepository_defaultBranch (6.54s)
=== RUN   TestAccGithubRepository_templates
--- PASS: TestAccGithubRepository_templates (3.51s)
=== RUN   TestAccGithubRepository_topics
--- PASS: TestAccGithubRepository_topics (6.62s)
=== RUN   TestAccGithubRepository_autoInitForceNew
--- PASS: TestAccGithubRepository_autoInitForceNew (6.16s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	39.330s

State migration is not required, because Read can just keep setting []string and Set() will do its magic.

@radeksimko radeksimko added the Type: Bug Something isn't working as documented label Aug 17, 2018
@radeksimko radeksimko merged commit 958e31c into master Aug 17, 2018
@radeksimko radeksimko deleted the b-topics-set branch August 17, 2018 13:44
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
…-set

resource/github_repository: Avoid spurious diff for topics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants