Introduced by: https://github.com/integrations/terraform-provider-github/blame/15fff783674a8c26cf536a3f84ef662520baccb7/github/resource_github_repository_environment.go#L234
Our environments have the : character, and since update v6.10.0 we can no longer use the provider to provision our environments.
We have the following error message:
Error: unexpected ID format ("some-repository:my:environment")
Where we have one environment named my:environment.
I can probably do a fix, but the issue is that everything relies on the parseID method which ensures that it properly split into a given count.
|
func parseID(id string, count int) ([]string, error) { |
|
if len(id) == 0 { |
|
return nil, fmt.Errorf("id is empty") |
|
} |
|
|
|
parts := strings.Split(id, idSeparator) |
|
if len(parts) != count { |
|
return nil, fmt.Errorf("unexpected ID format (%q); expected %d parts separated by %q", id, count, idSeparator) |
|
} |
|
|
|
return parts, nil |
|
} |
I would fix this by ensuring that parseID2 splits in at least 2, and collect all the remaining splits in the second argument. Same for 3. Or by using a different separator but I'm not sure what the implications would be.
I'll do a PR and you'll give me some feedback.
Introduced by: https://github.com/integrations/terraform-provider-github/blame/15fff783674a8c26cf536a3f84ef662520baccb7/github/resource_github_repository_environment.go#L234
Our environments have the
:character, and since update v6.10.0 we can no longer use the provider to provision our environments.We have the following error message:
Where we have one environment named
my:environment.I can probably do a fix, but the issue is that everything relies on the
parseIDmethod which ensures that it properly split into a given count.terraform-provider-github/github/util.go
Lines 57 to 68 in 15fff78
I would fix this by ensuring that
parseID2splits in at least 2, and collect all the remaining splits in the second argument. Same for 3. Or by using a different separator but I'm not sure what the implications would be.I'll do a PR and you'll give me some feedback.