Skip to content

Commit

Permalink
Terraform forces replacement if the project-level robot account prefi…
Browse files Browse the repository at this point in the history
…x contains plus sign (fixes #479) (#484)

fixes #479

Signed-off-by: flbla <[email protected]>
  • Loading branch information
flbla authored Dec 16, 2024
1 parent 042512c commit 45cf0b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/goharbor/terraform-provider-harbor

go 1.22
toolchain go1.22.5
go 1.22.0

toolchain go1.23.4

require github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0

Expand Down
2 changes: 1 addition & 1 deletion provider/resource_robot_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func resourceRobotAccountRead(d *schema.ResourceData, m interface{}) error {

var shortName string
if robot.Level == "project" {
shortName = strings.Split(robot.Name, "+")[1]
shortName = strings.Split(robot.Name, robot.Permissions[0].Namespace+"+")[1]
} else {
resp, _, respCode, err := apiClient.SendRequest("GET", models.PathConfig, nil, 200)
if respCode == 404 && err != nil {
Expand Down

0 comments on commit 45cf0b8

Please sign in to comment.