terraform-provider-google/google/resource_compute_global_address_generated_test.go

53 lines
1.4 KiB
Go
Raw Normal View History

2018-09-24 22:35:43 +00:00
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Magic Modules and manual
// changes will be clobbered when the file is regenerated.
//
// Please read more about how to change this file in
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------
package google
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
2018-10-24 19:06:09 +00:00
func TestAccComputeGlobalAddress_GlobalAddressBasicExample(t *testing.T) {
2018-09-24 22:35:43 +00:00
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeGlobalAddressDestroy,
Steps: []resource.TestStep{
{
2018-10-24 19:06:09 +00:00
Config: testAccComputeGlobalAddress_GlobalAddressBasicExample(acctest.RandString(10)),
2018-09-24 22:35:43 +00:00
},
{
ResourceName: "google_compute_global_address.default",
ImportState: true,
ImportStateVerify: true,
},
},
})
}
2018-10-24 19:06:09 +00:00
func testAccComputeGlobalAddress_GlobalAddressBasicExample(val string) string {
2018-09-24 22:35:43 +00:00
return fmt.Sprintf(`
resource "google_compute_global_address" "default" {
name = "global-appserver-ip-%s"
}
`, val,
)
}