Skip to content

Commit

Permalink
Merge pull request #1665 from snyk/fix-google-acc-tests
Browse files Browse the repository at this point in the history
[CTX-601] chore: fix some Google acceptance tests
  • Loading branch information
craigfurman authored Jun 1, 2023
2 parents fa65e27 + 39444fd commit fb08fd4
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 21 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
provider "google" {}

terraform {
required_version = "~> 0.15.0"
required_providers {
google = {
version = "3.78.0"
}
required_version = "~> 0.15.0"
required_providers {
google = {
version = "3.78.0"
}
}
}

resource "random_string" "postfix" {
length = 6
upper = false
special = false
length = 6
upper = false
special = false
}

resource "google_compute_ssl_certificate" "default" {
name = random_id.certificate.hex
private_key = file("host.key")
Expand All @@ -24,10 +25,6 @@ resource "google_compute_ssl_certificate" "default" {
}
}

provider "google" {
project = "driftctl"
}

resource "random_id" "certificate" {
byte_length = 4
prefix = "my-certificate-"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ terraform {

resource "google_project_iam_member" "elie1" {
role = "roles/editor"
member = "user:[email protected]"
member = "group:[email protected]"
}

resource "google_project_iam_member" "will1" {
role = "roles/viewer"
member = "user:[email protected]"
member = "group:[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ resource "google_storage_bucket_iam_binding" "binding_admin_1" {
bucket = google_storage_bucket.driftctl-unittest.name
role = "roles/storage.admin"
members = [
"user:team-[email protected]",
"group:cloud-context-team@snyk.io",
]
}

resource "google_storage_bucket_iam_binding" "binding_viewer_1" {
bucket = google_storage_bucket.driftctl-unittest.name
role = "roles/storage.objectViewer"
members = [
"user:team-[email protected]",
"group:cloud-context-team@snyk.io",
]
}

Expand All @@ -45,6 +45,6 @@ resource "google_storage_bucket_iam_binding" "binding_admin_2" {
bucket = google_storage_bucket.driftctl-unittest2.name
role = "roles/storage.admin"
members = [
"user:team-[email protected]",
"group:cloud-context-team@snyk.io",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ resource "google_storage_bucket" "driftctl-unittest" {
resource "google_storage_bucket_iam_member" "elie1" {
bucket = google_storage_bucket.driftctl-unittest.name
role = "roles/storage.admin"
member = "user:team-[email protected]"
member = "group:cloud-context-team@snyk.io"
}

resource "google_storage_bucket_iam_member" "will1" {
bucket = google_storage_bucket.driftctl-unittest.name
role = "roles/storage.objectViewer"
member = "user:team-[email protected]"
member = "group:cloud-context-team@snyk.io"
}

resource "google_storage_bucket" "driftctl-unittest2" {
Expand All @@ -40,11 +40,11 @@ resource "google_storage_bucket" "driftctl-unittest2" {
resource "google_storage_bucket_iam_member" "eli2" {
bucket = google_storage_bucket.driftctl-unittest2.name
role = "roles/storage.objectViewer"
member = "user:team-[email protected]"
member = "group:cloud-context-team@snyk.io"
}

resource "google_storage_bucket_iam_member" "will2" {
bucket = google_storage_bucket.driftctl-unittest2.name
role = "roles/storage.admin"
member = "user:team-[email protected]"
member = "group:cloud-context-team@snyk.io"
}

0 comments on commit fb08fd4

Please sign in to comment.