2017-11-14 00:05:16 +00:00
|
|
|
package google
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccGoogleOrganizationIamCustomRole_import(t *testing.T) {
|
|
|
|
t.Parallel()
|
|
|
|
|
2017-11-20 23:45:51 +00:00
|
|
|
org := getTestOrgFromEnv(t)
|
2017-11-14 00:05:16 +00:00
|
|
|
roleId := "tfIamRole" + acctest.RandString(10)
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckGoogleOrganizationIamCustomRoleDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
{
|
|
|
|
Config: testAccCheckGoogleOrganizationIamCustomRole_update(org, roleId),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ResourceName: "google_organization_iam_custom_role.foo",
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|