Fix resourceGithubDependabotOrganizationSecretCreateOrUpdate#1759
Merged
kfcampbell merged 1 commit intointegrations:mainfrom Jun 27, 2023
Merged
Fix resourceGithubDependabotOrganizationSecretCreateOrUpdate#1759kfcampbell merged 1 commit intointegrations:mainfrom
resourceGithubDependabotOrganizationSecretCreateOrUpdate#1759kfcampbell merged 1 commit intointegrations:mainfrom
Conversation
frankywahl
commented
Jun 27, 2023
Fixes a regression used when trying to create/update a dependabot
organization secret. List is an `int` so cannot be cast to a different
type. We therefore double convert it.
There was a regression introduced by version 5.27. This
happened as the go-github client moved over to using int64 as ids in
v53.0.0
```hcl
terraform {
required_providers {
github = {
source = "integrations/github"
version = "5.27.0"
}
}
}
provider "github" {
owner = var.owner
}
variable "owner" {
type = string
}
resource "github_repository" "example" {
name = "example"
description = "My awesome codebase"
visibility = "public"
}
resource "github_dependabot_organization_secret" "example" {
secret_name = "example"
visibility = "selected"
plaintext_value = "anything"
selected_repository_ids = [
github_repository.example.repo_id,
]
}
```
b56d4dc to
8c12ad6
Compare
avidspartan1
pushed a commit
to avidspartan1/terraform-provider-github
that referenced
this pull request
Feb 5, 2024
…rations#1759) Fixes a regression used when trying to create/update a dependabot organization secret. List is an `int` so cannot be cast to a different type. We therefore double convert it. There was a regression introduced by version 5.27. This happened as the go-github client moved over to using int64 as ids in v53.0.0 ```hcl terraform { required_providers { github = { source = "integrations/github" version = "5.27.0" } } } provider "github" { owner = var.owner } variable "owner" { type = string } resource "github_repository" "example" { name = "example" description = "My awesome codebase" visibility = "public" } resource "github_dependabot_organization_secret" "example" { secret_name = "example" visibility = "selected" plaintext_value = "anything" selected_repository_ids = [ github_repository.example.repo_id, ] } ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a regression used when trying to create/update a dependabot organization secret. List is an
intso cannot be cast to a different type. We therefore double convert it.There was a regression introduced by version 5.27. This happened as the go-github client moved over to using int64 as ids in v53.0.0
Resolves #1746
Pull request checklist
Does this introduce a breaking change?
It should fix an issue after the provider get upgraded.
Notes:
CreateOrUpdateOrgSecretregression introduced in v53 google/go-github#2817 being released (and client updated)