mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-03 08:42:39 +00:00
Update resource_compute_instance_iam_test.go
fixing whitespace/tabbing issue
This commit is contained in:
parent
b907b5a0c0
commit
79593d8fc6
|
@ -211,24 +211,24 @@ resource "google_compute_instance_iam_policy" "foo" {
|
|||
|
||||
func testAccComputeInstanceIamBinding_basic(project, account, region, zone, subnetworkName, instanceName, roleId string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_service_account" "test_account" {
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_network" "network" {
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_subnetwork" "subnetwork" {
|
||||
resource "google_compute_subnetwork" "subnetwork" {
|
||||
name = "%s"
|
||||
region = "%s"
|
||||
ip_cidr_range = "10.1.0.0/16"
|
||||
network = "${google_compute_network.network.name}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
|
@ -241,43 +241,43 @@ func testAccComputeInstanceIamBinding_basic(project, account, region, zone, subn
|
|||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_instance_iam_binding" "foo" {
|
||||
resource "google_compute_instance_iam_binding" "foo" {
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
zone = "${google_compute_instance.test_vm.zone}"
|
||||
instance_name = "${google_compute_instance.test_vm.name}"
|
||||
role = "%s"
|
||||
members = ["serviceAccount:${google_service_account.test_account.email}"]
|
||||
}
|
||||
`, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
`, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
|
||||
func testAccComputeInstanceIamBinding_update(project, account, region, zone, subnetworkName, instanceName, roleId string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_service_account" "test_account" {
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_service_account" "test_account_2" {
|
||||
resource "google_service_account" "test_account_2" {
|
||||
account_id = "%s-2"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_network" "network" {
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_subnetwork" "subnetwork" {
|
||||
resource "google_compute_subnetwork" "subnetwork" {
|
||||
name = "%s"
|
||||
region = "%s"
|
||||
ip_cidr_range = "10.1.0.0/16"
|
||||
network = "${google_compute_network.network.name}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
|
@ -290,9 +290,9 @@ func testAccComputeInstanceIamBinding_update(project, account, region, zone, sub
|
|||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_instance_iam_binding" "foo" {
|
||||
resource "google_compute_instance_iam_binding" "foo" {
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
zone = "${google_compute_instance.test_vm.zone}"
|
||||
instance_name = "${google_compute_instance.test_vm.name}"
|
||||
|
@ -301,6 +301,6 @@ func testAccComputeInstanceIamBinding_update(project, account, region, zone, sub
|
|||
"serviceAccount:${google_service_account.test_account.email}",
|
||||
"serviceAccount:${google_service_account.test_account_2.email}"
|
||||
]
|
||||
}
|
||||
`, account, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
`, account, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user