-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dependencies: updating
github.com/hashicorp/terraform-plugin-sdk
to…
… `v1.13.1`
- Loading branch information
1 parent
aa59c73
commit 68a2f63
Showing
412 changed files
with
29,638 additions
and
86,387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package acceptance | ||
|
||
import ( | ||
"os" | ||
"sync" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
"github.com/hashicorp/terraform-plugin-sdk/terraform" | ||
"github.com/terraform-providers/terraform-provider-azuread/azuread" | ||
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/provider" | ||
) | ||
|
||
var once sync.Once | ||
|
||
func EnsureProvidersAreInitialised() { | ||
// NOTE: (@tombuildsstuff) - opting-out of Binary Testing for the moment | ||
os.Setenv("TF_DISABLE_BINARY_TESTING", "true") | ||
|
||
once.Do(func() { | ||
azureProvider := provider.TestAzureProvider().(*schema.Provider) | ||
|
||
AzureProvider = azureProvider | ||
SupportedProviders = map[string]terraform.ResourceProvider{ | ||
"azurerm": azureProvider, | ||
"azuread": azuread.Provider().(*schema.Provider), | ||
} | ||
|
||
// NOTE: (@tombuildsstuff) - intentionally not calling these as Binary Testing | ||
// is Disabled | ||
//binarytestfuntime.UseBinaryDriver("azurerm", provider.TestAzureProvider) | ||
//binarytestfuntime.UseBinaryDriver("azuread", azuread.Provider) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package locks | ||
|
||
import ( | ||
"log" | ||
"sync" | ||
) | ||
|
||
// mutexKV is a simple key/value store for arbitrary mutexes. It can be used to | ||
// serialize changes across arbitrary collaborators that share knowledge of the | ||
// keys they must serialize on. | ||
type mutexKV struct { | ||
lock sync.Mutex | ||
store map[string]*sync.Mutex | ||
} | ||
|
||
// Locks the mutex for the given key. Caller is responsible for calling Unlock | ||
// for the same key | ||
func (m *mutexKV) Lock(key string) { | ||
log.Printf("[DEBUG] Locking %q", key) | ||
m.get(key).Lock() | ||
log.Printf("[DEBUG] Locked %q", key) | ||
} | ||
|
||
// Unlock the mutex for the given key. Caller must have called Lock for the same key first | ||
func (m *mutexKV) Unlock(key string) { | ||
log.Printf("[DEBUG] Unlocking %q", key) | ||
m.get(key).Unlock() | ||
log.Printf("[DEBUG] Unlocked %q", key) | ||
} | ||
|
||
// Returns a mutex for the given key, no guarantee of its lock status | ||
func (m *mutexKV) get(key string) *sync.Mutex { | ||
m.lock.Lock() | ||
defer m.lock.Unlock() | ||
mutex, ok := m.store[key] | ||
if !ok { | ||
mutex = &sync.Mutex{} | ||
m.store[key] = mutex | ||
} | ||
return mutex | ||
} | ||
|
||
// Returns a properly initialized mutexKV | ||
func NewMutexKV() *mutexKV { | ||
return &mutexKV{ | ||
store: make(map[string]*sync.Mutex), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.