Skip to content

Commit

Permalink
Add RegionTargetHttp(s)Proxy, RegionSslCertificate to compute
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
Ty Larrabee authored and modular-magician committed Sep 24, 2019
1 parent e8829e4 commit e7032df
Show file tree
Hide file tree
Showing 18 changed files with 2,760 additions and 70 deletions.
7 changes: 5 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 94
// Generated resources: 97
// Generated IAM resources: 24
// Total generated resources: 118
// Total generated resources: 121
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -535,11 +535,14 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_compute_snapshot": resourceComputeSnapshot(),
"google_compute_ssl_certificate": resourceComputeSslCertificate(),
"google_compute_managed_ssl_certificate": resourceComputeManagedSslCertificate(),
"google_compute_region_ssl_certificate": resourceComputeRegionSslCertificate(),
"google_compute_reservation": resourceComputeReservation(),
"google_compute_ssl_policy": resourceComputeSslPolicy(),
"google_compute_subnetwork": resourceComputeSubnetwork(),
"google_compute_target_http_proxy": resourceComputeTargetHttpProxy(),
"google_compute_target_https_proxy": resourceComputeTargetHttpsProxy(),
"google_compute_region_target_http_proxy": resourceComputeRegionTargetHttpProxy(),
"google_compute_region_target_https_proxy": resourceComputeRegionTargetHttpsProxy(),
"google_compute_target_instance": resourceComputeTargetInstance(),
"google_compute_target_ssl_proxy": resourceComputeTargetSslProxy(),
"google_compute_target_tcp_proxy": resourceComputeTargetTcpProxy(),
Expand Down
80 changes: 60 additions & 20 deletions google-beta/resource_compute_region_health_check_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckTcpExample(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckTcpExample(context),
},
{
ResourceName: "google_compute_region_health_check.tcp-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckTcpExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "tcp-region-health-check" {
provider = "google-beta"
name = "tcp-region-health-check%{random_suffix}"
timeout_sec = 1
Expand All @@ -68,20 +72,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckTcpFullExample(t *testing.

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckTcpFullExample(context),
},
{
ResourceName: "google_compute_region_health_check.tcp-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckTcpFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "tcp-region-health-check" {
provider = "google-beta"
name = "tcp-region-health-check%{random_suffix}"
description = "Health check via tcp"
Expand Down Expand Up @@ -110,20 +118,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckSslExample(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckSslExample(context),
},
{
ResourceName: "google_compute_region_health_check.ssl-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckSslExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "ssl-region-health-check" {
provider = "google-beta"
name = "ssl-region-health-check%{random_suffix}"
timeout_sec = 1
Expand All @@ -145,20 +157,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckSslFullExample(t *testing.

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckSslFullExample(context),
},
{
ResourceName: "google_compute_region_health_check.ssl-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckSslFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "ssl-region-health-check" {
provider = "google-beta"
name = "ssl-region-health-check%{random_suffix}"
description = "Health check via ssl"
Expand Down Expand Up @@ -187,20 +203,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttpExample(t *testing.T)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttpExample(context),
},
{
ResourceName: "google_compute_region_health_check.http-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttpExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "http-region-health-check" {
provider = "google-beta"
name = "http-region-health-check%{random_suffix}"
timeout_sec = 1
Expand All @@ -222,20 +242,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttpFullExample(t *testing

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttpFullExample(context),
},
{
ResourceName: "google_compute_region_health_check.http-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttpFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "http-region-health-check" {
provider = "google-beta"
name = "http-region-health-check%{random_suffix}"
description = "Health check via http"
Expand Down Expand Up @@ -265,20 +289,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttpsExample(t *testing.T)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttpsExample(context),
},
{
ResourceName: "google_compute_region_health_check.https-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttpsExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "https-region-health-check" {
provider = "google-beta"
name = "https-region-health-check%{random_suffix}"
timeout_sec = 1
Expand All @@ -300,20 +328,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttpsFullExample(t *testin

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttpsFullExample(context),
},
{
ResourceName: "google_compute_region_health_check.https-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttpsFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "https-region-health-check" {
provider = "google-beta"
name = "https-region-health-check%{random_suffix}"
description = "Health check via https"
Expand Down Expand Up @@ -343,20 +375,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttp2Example(t *testing.T)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttp2Example(context),
},
{
ResourceName: "google_compute_region_health_check.http2-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttp2Example(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "http2-region-health-check" {
provider = "google-beta"
name = "http2-region-health-check%{random_suffix}"
timeout_sec = 1
Expand All @@ -378,20 +414,24 @@ func TestAccComputeRegionHealthCheck_regionHealthCheckHttp2FullExample(t *testin

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRegionHealthCheckDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionHealthCheck_regionHealthCheckHttp2FullExample(context),
},
{
ResourceName: "google_compute_region_health_check.http2-region-health-check",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionHealthCheck_regionHealthCheckHttp2FullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_health_check" "http2-region-health-check" {
provider = "google-beta"
name = "http2-region-health-check%{random_suffix}"
description = "Health check via http2"
Expand Down
Loading

0 comments on commit e7032df

Please sign in to comment.