mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
backend/remote-state/gcs: Include project ID in bucket names when testing.
Since bucket names must be *globally* unique. By including the project ID in the bucket name we ensure that people don't step on each other's feet when testing.
This commit is contained in:
parent
dcb84ee2c2
commit
3023ae2813
@ -3,7 +3,6 @@ package gcs
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/backend"
|
"github.com/hashicorp/terraform/backend"
|
||||||
@ -118,7 +117,7 @@ func setupBackend(t *testing.T) backend.Backend {
|
|||||||
|
|
||||||
config := map[string]interface{}{
|
config := map[string]interface{}{
|
||||||
"project": projectID,
|
"project": projectID,
|
||||||
"bucket": strings.ToLower(t.Name()),
|
"bucket": projectID + "-" + t.Name(),
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user