From ae814b0a78df15d390070fbab596df98fb3178f2 Mon Sep 17 00:00:00 2001 From: Oleg Atamanenko Date: Wed, 26 Jun 2024 20:17:42 -0700 Subject: [PATCH] fix: import secret_name to state when importing github_actions_organization_secret_repositories --- ...urce_github_actions_organization_secret_repositories.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/github/resource_github_actions_organization_secret_repositories.go b/github/resource_github_actions_organization_secret_repositories.go index 3e5162b145..335a220d7c 100644 --- a/github/resource_github_actions_organization_secret_repositories.go +++ b/github/resource_github_actions_organization_secret_repositories.go @@ -14,7 +14,12 @@ func resourceGithubActionsOrganizationSecretRepositories() *schema.Resource { Update: resourceGithubActionsOrganizationSecretRepositoriesCreateOrUpdate, Delete: resourceGithubActionsOrganizationSecretRepositoriesDelete, Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + if err := d.Set("secret_name", d.Id()); err != nil { + return nil, err + } + return []*schema.ResourceData{d}, nil + }, }, Schema: map[string]*schema.Schema{