-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix generated import formats for resources that allow in their names
Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
9afcffe
commit 6eec31d
Showing
6 changed files
with
24 additions
and
18 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 |
---|---|---|
|
@@ -39,7 +39,7 @@ func TestAccSourceRepoRepositoryIamBindingGenerated(t *testing.T) { | |
}, | ||
{ | ||
ResourceName: "google_sourcerepo_repository_iam_binding.foo", | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", getTestProjectFromEnv(), fmt.Sprintf("my-repository%s", context["random_suffix"])), | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", getTestProjectFromEnv(), fmt.Sprintf("my-repository/%s", context["random_suffix"])), | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
|
@@ -49,7 +49,7 @@ func TestAccSourceRepoRepositoryIamBindingGenerated(t *testing.T) { | |
}, | ||
{ | ||
ResourceName: "google_sourcerepo_repository_iam_binding.foo", | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", getTestProjectFromEnv(), fmt.Sprintf("my-repository%s", context["random_suffix"])), | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", getTestProjectFromEnv(), fmt.Sprintf("my-repository/%s", context["random_suffix"])), | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
|
@@ -75,7 +75,7 @@ func TestAccSourceRepoRepositoryIamMemberGenerated(t *testing.T) { | |
}, | ||
{ | ||
ResourceName: "google_sourcerepo_repository_iam_member.foo", | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer user:[email protected]", getTestProjectFromEnv(), fmt.Sprintf("my-repository%s", context["random_suffix"])), | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer user:[email protected]", getTestProjectFromEnv(), fmt.Sprintf("my-repository/%s", context["random_suffix"])), | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
|
@@ -100,7 +100,7 @@ func TestAccSourceRepoRepositoryIamPolicyGenerated(t *testing.T) { | |
}, | ||
{ | ||
ResourceName: "google_sourcerepo_repository_iam_policy.foo", | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s", getTestProjectFromEnv(), fmt.Sprintf("my-repository%s", context["random_suffix"])), | ||
ImportStateId: fmt.Sprintf("projects/%s/repos/%s", getTestProjectFromEnv(), fmt.Sprintf("my-repository/%s", context["random_suffix"])), | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
|
@@ -111,7 +111,7 @@ func TestAccSourceRepoRepositoryIamPolicyGenerated(t *testing.T) { | |
func testAccSourceRepoRepositoryIamMember_basicGenerated(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_sourcerepo_repository" "my-repo" { | ||
name = "my-repository%{random_suffix}" | ||
name = "my-repository/%{random_suffix}" | ||
} | ||
resource "google_sourcerepo_repository_iam_member" "foo" { | ||
|
@@ -126,7 +126,7 @@ resource "google_sourcerepo_repository_iam_member" "foo" { | |
func testAccSourceRepoRepositoryIamPolicy_basicGenerated(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_sourcerepo_repository" "my-repo" { | ||
name = "my-repository%{random_suffix}" | ||
name = "my-repository/%{random_suffix}" | ||
} | ||
data "google_iam_policy" "foo" { | ||
|
@@ -147,7 +147,7 @@ resource "google_sourcerepo_repository_iam_policy" "foo" { | |
func testAccSourceRepoRepositoryIamBinding_basicGenerated(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_sourcerepo_repository" "my-repo" { | ||
name = "my-repository%{random_suffix}" | ||
name = "my-repository/%{random_suffix}" | ||
} | ||
resource "google_sourcerepo_repository_iam_binding" "foo" { | ||
|
@@ -162,7 +162,7 @@ resource "google_sourcerepo_repository_iam_binding" "foo" { | |
func testAccSourceRepoRepositoryIamBinding_updateGenerated(context map[string]interface{}) string { | ||
return Nprintf(` | ||
resource "google_sourcerepo_repository" "my-repo" { | ||
name = "my-repository%{random_suffix}" | ||
name = "my-repository/%{random_suffix}" | ||
} | ||
resource "google_sourcerepo_repository_iam_binding" "foo" { | ||
|
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