diff --git a/github/resource_github_actions_hosted_runner.go b/github/resource_github_actions_hosted_runner.go index 375f992089..c0ff62b6aa 100644 --- a/github/resource_github_actions_hosted_runner.go +++ b/github/resource_github_actions_hosted_runner.go @@ -218,7 +218,7 @@ func flattenImage(image map[string]any) []any { if source, ok := image["source"].(string); ok { result["source"] = source } - if size, ok := image["size"].(float64); ok { + if size, ok := image["size_gb"].(float64); ok { result["size_gb"] = int(size) } @@ -399,7 +399,7 @@ func resourceGithubActionsHostedRunnerRead(d *schema.ResourceData, meta any) err } } - if image, ok := runner["image"].(map[string]any); ok { + if image, ok := runner["image_details"].(map[string]any); ok { if err := d.Set("image", flattenImage(image)); err != nil { return err } diff --git a/github/resource_github_actions_hosted_runner_test.go b/github/resource_github_actions_hosted_runner_test.go index ff510d84aa..80478bc018 100644 --- a/github/resource_github_actions_hosted_runner_test.go +++ b/github/resource_github_actions_hosted_runner_test.go @@ -345,7 +345,7 @@ func TestAccGithubActionsHostedRunner(t *testing.T) { ResourceName: "github_actions_hosted_runner.test", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"image", "image_gen"}, + ImportStateVerifyIgnore: []string{"image_gen"}, }, }, })