Skip to content

Commit

Permalink
make tfgen
Browse files Browse the repository at this point in the history
  • Loading branch information
aq17 committed Apr 20, 2023
1 parent 906effe commit 4efbd2f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/0002-Avoid-panic-in-base_fastly_service.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 00673c35cf1c68df9cb24621d7d47e60a3d8fe47 Mon Sep 17 00:00:00 2001
From: aq17 <[email protected]>
Date: Thu, 20 Apr 2023 15:17:05 -0700
Subject: [PATCH] Avoid panic in base_fastly_service

---
fastly/base_fastly_service.go | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/fastly/base_fastly_service.go b/fastly/base_fastly_service.go
index c0c4c6f6..300676db 100644
--- a/fastly/base_fastly_service.go
+++ b/fastly/base_fastly_service.go
@@ -165,7 +165,11 @@ func validateUniqueNames(block string) func(_ context.Context, rd *schema.Resour
return func(_ context.Context, rd *schema.ResourceDiff, _ any) error {
names := make(map[string]int)

+ // Avoid panic in rd.GetRawConfig()
c := rd.GetRawConfig()
+ if c.IsNull() {
+ return nil
+ }
m := c.AsValueMap()
s, ok := m[block]
if ok {
--
2.39.1

0 comments on commit 4efbd2f

Please sign in to comment.