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

Fix importing minio_iam_group #390

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion minio/resource_minio_iam_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func minioReadGroup(ctx context.Context, d *schema.ResourceData, meta interface{

iamGroupConfig := IAMGroupConfig(d, meta)

output, err := iamGroupConfig.MinioAdmin.GetGroupDescription(ctx, iamGroupConfig.MinioIAMName)
output, err := iamGroupConfig.MinioAdmin.GetGroupDescription(ctx, d.Id())
if err != nil {
if strings.Contains(err.Error(), "group does not exist") {
log.Printf("[WARN] No IAM group by name (%s) found, removing from state", d.Id())
Expand Down
6 changes: 6 additions & 0 deletions minio/resource_minio_iam_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ func TestAccAWSGroup_Basic(t *testing.T) {
testAccCheckMinioGroupDisable(&conf, groupName2, status2),
),
},
{
ResourceName: "minio_iam_group.test2",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"disable_group", "force_destroy", "name"},
},
},
})
}
Expand Down