mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-01 07:42:40 +00:00
Update resource_compute_instance_iam_test.go
fixing whitespace/tabbing issue
This commit is contained in:
parent
b907b5a0c0
commit
79593d8fc6
|
@ -135,8 +135,8 @@ resource "google_compute_subnetwork" "subnetwork" {
|
|||
}
|
||||
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
|
@ -150,7 +150,7 @@ resource "google_compute_instance" "test_vm" {
|
|||
}
|
||||
|
||||
resource "google_compute_instance_iam_member" "foo" {
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
zone = "${google_compute_instance.test_vm.zone}"
|
||||
instance_name = "${google_compute_instance.test_vm.name}"
|
||||
role = "%s"
|
||||
|
@ -175,13 +175,13 @@ resource "google_compute_subnetwork" "subnetwork" {
|
|||
name = "%s"
|
||||
region = "%s"
|
||||
ip_cidr_range = "10.1.0.0/16"
|
||||
network = "${google_compute_network.network.name}"
|
||||
network = "${google_compute_network.network.name}"
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
|
@ -194,113 +194,113 @@ resource "google_compute_instance" "test_vm" {
|
|||
}
|
||||
|
||||
data "google_iam_policy" "foo" {
|
||||
binding {
|
||||
role = "%s"
|
||||
members = ["serviceAccount:${google_service_account.test_account.email}"]
|
||||
}
|
||||
binding {
|
||||
role = "%s"
|
||||
members = ["serviceAccount:${google_service_account.test_account.email}"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_instance_iam_policy" "foo" {
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
project = "${google_compute_instance.test_vm.project}"
|
||||
zone = "${google_compute_instance.test_vm.zone}"
|
||||
instance_name = "${google_compute_instance.test_vm.name}"
|
||||
policy_data = "${data.google_iam_policy.foo.policy_data}"
|
||||
policy_data = "${data.google_iam_policy.foo.policy_data}"
|
||||
}
|
||||
`, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
|
||||
func testAccComputeInstanceIamBinding_basic(project, account, region, zone, subnetworkName, instanceName, roleId string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
|
||||
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_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" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image = "debian-cloud/debian-9"
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
resource "google_compute_instance" "test_vm" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image = "debian-cloud/debian-9"
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
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)
|
||||
}
|
||||
|
||||
func testAccComputeInstanceIamBinding_update(project, account, region, zone, subnetworkName, instanceName, roleId string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
|
||||
resource "google_service_account" "test_account_2" {
|
||||
account_id = "%s-2"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
|
||||
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" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image = "debian-cloud/debian-9"
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
|
||||
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}",
|
||||
"serviceAccount:${google_service_account.test_account_2.email}"
|
||||
]
|
||||
}
|
||||
`, account, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
resource "google_service_account" "test_account" {
|
||||
account_id = "%s"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
|
||||
resource "google_service_account" "test_account_2" {
|
||||
account_id = "%s-2"
|
||||
display_name = "Iam Testing Account"
|
||||
}
|
||||
|
||||
resource "google_compute_network" "network" {
|
||||
name = "%s"
|
||||
auto_create_subnetworks = false
|
||||
}
|
||||
|
||||
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" {
|
||||
project = "%s"
|
||||
zone = "%s"
|
||||
name = "%s"
|
||||
machine_type = "n1-standard-1"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image = "debian-cloud/debian-9"
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
subnetwork ="${google_compute_subnetwork.subnetwork.self_link}"
|
||||
}
|
||||
}
|
||||
|
||||
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}",
|
||||
"serviceAccount:${google_service_account.test_account_2.email}"
|
||||
]
|
||||
}
|
||||
`, account, account, subnetworkName, subnetworkName, region, project, zone, instanceName, roleId)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user