Skip to content

Commit

Permalink
Add liens resource.
Browse files Browse the repository at this point in the history
Fixes #1435.
  • Loading branch information
nat-henderson authored and modular-magician committed May 16, 2018
1 parent 6ae7dc6 commit 3bb176f
Show file tree
Hide file tree
Showing 14 changed files with 521 additions and 10 deletions.
21 changes: 21 additions & 0 deletions google/provider_resourcemanager_gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// ----------------------------------------------------------------------------
//
// *** 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 "github.com/hashicorp/terraform/helper/schema"

var GeneratedResourceManagerResourcesMap = map[string]*schema.Resource{
"google_resource_manager_lien": resourceResourceManagerLien(),
}
4 changes: 4 additions & 0 deletions google/resource_compute_backend_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ func resourceComputeBackendBucketCreate(d *schema.ResourceData, meta interface{}
return fmt.Errorf("Error waiting to create BackendBucket: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating BackendBucket %q: %#v", d.Id(), res)

return resourceComputeBackendBucketRead(d, meta)
}

Expand All @@ -163,6 +165,7 @@ func resourceComputeBackendBucketRead(d *schema.ResourceData, meta interface{})
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeBackendBucket %q", d.Id()))
}

if err := d.Set("bucket_name", flattenComputeBackendBucketBucketName(res["bucketName"])); err != nil {
return fmt.Errorf("Error reading BackendBucket: %s", err)
}
Expand Down Expand Up @@ -282,6 +285,7 @@ func resourceComputeBackendBucketDelete(d *schema.ResourceData, meta interface{}
return err
}

log.Printf("[DEBUG] Finished deleting BackendBucket %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_global_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func resourceComputeGlobalAddressCreate(d *schema.ResourceData, meta interface{}
return fmt.Errorf("Error waiting to create GlobalAddress: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating GlobalAddress %q: %#v", d.Id(), res)

return resourceComputeGlobalAddressRead(d, meta)
}

Expand All @@ -159,6 +161,7 @@ func resourceComputeGlobalAddressRead(d *schema.ResourceData, meta interface{})
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeGlobalAddress %q", d.Id()))
}

if err := d.Set("address", flattenComputeGlobalAddressAddress(res["address"])); err != nil {
return fmt.Errorf("Error reading GlobalAddress: %s", err)
}
Expand Down Expand Up @@ -217,6 +220,7 @@ func resourceComputeGlobalAddressDelete(d *schema.ResourceData, meta interface{}
return err
}

log.Printf("[DEBUG] Finished deleting GlobalAddress %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_http_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func resourceComputeHttpHealthCheckCreate(d *schema.ResourceData, meta interface
return fmt.Errorf("Error waiting to create HttpHealthCheck: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating HttpHealthCheck %q: %#v", d.Id(), res)

return resourceComputeHttpHealthCheckRead(d, meta)
}

Expand All @@ -214,6 +216,7 @@ func resourceComputeHttpHealthCheckRead(d *schema.ResourceData, meta interface{}
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeHttpHealthCheck %q", d.Id()))
}

if err := d.Set("check_interval_sec", flattenComputeHttpHealthCheckCheckIntervalSec(res["checkIntervalSec"])); err != nil {
return fmt.Errorf("Error reading HttpHealthCheck: %s", err)
}
Expand Down Expand Up @@ -373,6 +376,7 @@ func resourceComputeHttpHealthCheckDelete(d *schema.ResourceData, meta interface
return err
}

log.Printf("[DEBUG] Finished deleting HttpHealthCheck %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_https_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func resourceComputeHttpsHealthCheckCreate(d *schema.ResourceData, meta interfac
return fmt.Errorf("Error waiting to create HttpsHealthCheck: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating HttpsHealthCheck %q: %#v", d.Id(), res)

return resourceComputeHttpsHealthCheckRead(d, meta)
}

Expand All @@ -214,6 +216,7 @@ func resourceComputeHttpsHealthCheckRead(d *schema.ResourceData, meta interface{
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeHttpsHealthCheck %q", d.Id()))
}

if err := d.Set("check_interval_sec", flattenComputeHttpsHealthCheckCheckIntervalSec(res["checkIntervalSec"])); err != nil {
return fmt.Errorf("Error reading HttpsHealthCheck: %s", err)
}
Expand Down Expand Up @@ -373,6 +376,7 @@ func resourceComputeHttpsHealthCheckDelete(d *schema.ResourceData, meta interfac
return err
}

log.Printf("[DEBUG] Finished deleting HttpsHealthCheck %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_ssl_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ func resourceComputeSslPolicyCreate(d *schema.ResourceData, meta interface{}) er
return fmt.Errorf("Error waiting to create SslPolicy: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating SslPolicy %q: %#v", d.Id(), res)

return resourceComputeSslPolicyRead(d, meta)
}

Expand All @@ -215,6 +217,7 @@ func resourceComputeSslPolicyRead(d *schema.ResourceData, meta interface{}) erro
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeSslPolicy %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeSslPolicyCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading SslPolicy: %s", err)
}
Expand Down Expand Up @@ -349,6 +352,7 @@ func resourceComputeSslPolicyDelete(d *schema.ResourceData, meta interface{}) er
return err
}

log.Printf("[DEBUG] Finished deleting SslPolicy %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_target_http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ func resourceComputeTargetHttpProxyCreate(d *schema.ResourceData, meta interface
return fmt.Errorf("Error waiting to create TargetHttpProxy: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating TargetHttpProxy %q: %#v", d.Id(), res)

return resourceComputeTargetHttpProxyRead(d, meta)
}

Expand All @@ -160,6 +162,7 @@ func resourceComputeTargetHttpProxyRead(d *schema.ResourceData, meta interface{}
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeTargetHttpProxy %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeTargetHttpProxyCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading TargetHttpProxy: %s", err)
}
Expand Down Expand Up @@ -272,6 +275,7 @@ func resourceComputeTargetHttpProxyDelete(d *schema.ResourceData, meta interface
return err
}

log.Printf("[DEBUG] Finished deleting TargetHttpProxy %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_target_https_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ func resourceComputeTargetHttpsProxyCreate(d *schema.ResourceData, meta interfac
return fmt.Errorf("Error waiting to create TargetHttpsProxy: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating TargetHttpsProxy %q: %#v", d.Id(), res)

return resourceComputeTargetHttpsProxyRead(d, meta)
}

Expand All @@ -183,6 +185,7 @@ func resourceComputeTargetHttpsProxyRead(d *schema.ResourceData, meta interface{
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeTargetHttpsProxy %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeTargetHttpsProxyCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading TargetHttpsProxy: %s", err)
}
Expand Down Expand Up @@ -367,6 +370,7 @@ func resourceComputeTargetHttpsProxyDelete(d *schema.ResourceData, meta interfac
return err
}

log.Printf("[DEBUG] Finished deleting TargetHttpsProxy %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_target_ssl_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ func resourceComputeTargetSslProxyCreate(d *schema.ResourceData, meta interface{
return fmt.Errorf("Error waiting to create TargetSslProxy: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating TargetSslProxy %q: %#v", d.Id(), res)

return resourceComputeTargetSslProxyRead(d, meta)
}

Expand All @@ -186,6 +188,7 @@ func resourceComputeTargetSslProxyRead(d *schema.ResourceData, meta interface{})
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeTargetSslProxy %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeTargetSslProxyCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading TargetSslProxy: %s", err)
}
Expand Down Expand Up @@ -370,6 +373,7 @@ func resourceComputeTargetSslProxyDelete(d *schema.ResourceData, meta interface{
return err
}

log.Printf("[DEBUG] Finished deleting TargetSslProxy %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_target_tcp_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ func resourceComputeTargetTcpProxyCreate(d *schema.ResourceData, meta interface{
return fmt.Errorf("Error waiting to create TargetTcpProxy: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating TargetTcpProxy %q: %#v", d.Id(), res)

return resourceComputeTargetTcpProxyRead(d, meta)
}

Expand All @@ -172,6 +174,7 @@ func resourceComputeTargetTcpProxyRead(d *schema.ResourceData, meta interface{})
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeTargetTcpProxy %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeTargetTcpProxyCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading TargetTcpProxy: %s", err)
}
Expand Down Expand Up @@ -320,6 +323,7 @@ func resourceComputeTargetTcpProxyDelete(d *schema.ResourceData, meta interface{
return err
}

log.Printf("[DEBUG] Finished deleting TargetTcpProxy %q: %#v", d.Id(), res)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions google/resource_compute_vpn_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ func resourceComputeVpnGatewayCreate(d *schema.ResourceData, meta interface{}) e
return fmt.Errorf("Error waiting to create VpnGateway: %s", waitErr)
}

log.Printf("[DEBUG] Finished creating VpnGateway %q: %#v", d.Id(), res)

return resourceComputeVpnGatewayRead(d, meta)
}

Expand All @@ -166,6 +168,7 @@ func resourceComputeVpnGatewayRead(d *schema.ResourceData, meta interface{}) err
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ComputeVpnGateway %q", d.Id()))
}

if err := d.Set("creation_timestamp", flattenComputeVpnGatewayCreationTimestamp(res["creationTimestamp"])); err != nil {
return fmt.Errorf("Error reading VpnGateway: %s", err)
}
Expand Down Expand Up @@ -224,6 +227,7 @@ func resourceComputeVpnGatewayDelete(d *schema.ResourceData, meta interface{}) e
return err
}

log.Printf("[DEBUG] Finished deleting VpnGateway %q: %#v", d.Id(), res)
return nil
}

Expand Down
Loading

0 comments on commit 3bb176f

Please sign in to comment.