From 827c7d352bcf29fd98884f3d1b51beaeba140a15 Mon Sep 17 00:00:00 2001 From: Noah Kontur Date: Wed, 29 May 2024 11:32:27 -0400 Subject: [PATCH] fix: reinitialization of cache rule context --- .../containers/container_registry_cache_rule_resource.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/services/containers/container_registry_cache_rule_resource.go b/internal/services/containers/container_registry_cache_rule_resource.go index 39bcf53f9f9b..2403a04ed408 100644 --- a/internal/services/containers/container_registry_cache_rule_resource.go +++ b/internal/services/containers/container_registry_cache_rule_resource.go @@ -88,7 +88,7 @@ func (r ContainerRegistryCacheRule) Create() sdk.ResourceFunc { Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { cacheRulesClient := metadata.Client.Containers.CacheRulesClient subscriptionId := metadata.Client.Account.SubscriptionId - ctx, cancel := timeouts.ForCreate(metadata.Client.StopContext, metadata.ResourceData) + _, cancel := timeouts.ForCreate(metadata.Client.StopContext, metadata.ResourceData) var config ContainerRegistryCacheRuleModel if err := metadata.Decode(&config); err != nil { @@ -149,7 +149,7 @@ func (ContainerRegistryCacheRule) Read() sdk.ResourceFunc { Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { cacheRulesClient := metadata.Client.Containers.CacheRulesClient - ctx, cancel := timeouts.ForRead(metadata.Client.StopContext, metadata.ResourceData) + _, cancel := timeouts.ForRead(metadata.Client.StopContext, metadata.ResourceData) var config ContainerRegistryCacheRuleModel if err := metadata.Decode(&config); err != nil { @@ -196,7 +196,7 @@ func (r ContainerRegistryCacheRule) Update() sdk.ResourceFunc { Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { cacheRulesClient := metadata.Client.Containers.CacheRulesClient - ctx, cancel := timeouts.ForUpdate(metadata.Client.StopContext, metadata.ResourceData) + _, cancel := timeouts.ForUpdate(metadata.Client.StopContext, metadata.ResourceData) var config ContainerRegistryCacheRuleModel if err := metadata.Decode(&config); err != nil { @@ -233,7 +233,7 @@ func (ContainerRegistryCacheRule) Delete() sdk.ResourceFunc { Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { cacheRulesClient := metadata.Client.Containers.CacheRulesClient - ctx, cancel := timeouts.ForDelete(metadata.Client.StopContext, metadata.ResourceData) + _, cancel := timeouts.ForDelete(metadata.Client.StopContext, metadata.ResourceData) defer cancel() id, err := cacherules.ParseCacheRuleID(metadata.ResourceData.Id())