mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
48 lines
996 B
Go
48 lines
996 B
Go
![]() |
package google
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
)
|
||
|
|
||
|
func TestAccMonitoringGroup_update(t *testing.T) {
|
||
|
t.Parallel()
|
||
|
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
CheckDestroy: testAccCheckMonitoringGroupDestroy,
|
||
|
Steps: []resource.TestStep{
|
||
|
{
|
||
|
Config: testAccMonitoringGroup_update("europe-west1"),
|
||
|
},
|
||
|
{
|
||
|
ResourceName: "google_monitoring_group.update",
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
},
|
||
|
{
|
||
|
Config: testAccMonitoringGroup_update("europe-west2"),
|
||
|
},
|
||
|
{
|
||
|
ResourceName: "google_monitoring_group.update",
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|
||
|
|
||
|
func testAccMonitoringGroup_update(zone string) string {
|
||
|
return fmt.Sprintf(`
|
||
|
resource "google_monitoring_group" "update" {
|
||
|
display_name = "Integration Test Group"
|
||
|
|
||
|
filter = "resource.metadata.region=\"%s\""
|
||
|
}
|
||
|
`, zone,
|
||
|
)
|
||
|
}
|