mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Rename instead of removing.
Rename all ID fields to {resource_noun}_id instead of removing them outright. This means people can still get at the info. Leave project's id deleted. It has been marked as Removed for months. I'm fine with cleaning it up before 1.0.0. Also, update website docs.
This commit is contained in:
parent
c3da024d7e
commit
ac73bebb15
@ -2,6 +2,7 @@ package google
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
@ -60,6 +61,11 @@ func resourceComputeSslCertificate() *schema.Resource {
|
|||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"certificate_id": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"project": &schema.Schema{
|
"project": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -134,6 +140,7 @@ func resourceComputeSslCertificateRead(d *schema.ResourceData, meta interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.Set("self_link", cert.SelfLink)
|
d.Set("self_link", cert.SelfLink)
|
||||||
|
d.Set("certificate_id", strconv.FormatUint(cert.Id, 10))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package google
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
"google.golang.org/api/compute/v1"
|
"google.golang.org/api/compute/v1"
|
||||||
@ -33,6 +34,11 @@ func resourceComputeTargetHttpProxy() *schema.Resource {
|
|||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"proxy_id": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"project": &schema.Schema{
|
"project": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -128,6 +134,7 @@ func resourceComputeTargetHttpProxyRead(d *schema.ResourceData, meta interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.Set("self_link", proxy.SelfLink)
|
d.Set("self_link", proxy.SelfLink)
|
||||||
|
d.Set("proxy_id", strconv.FormatUint(proxy.Id, 10))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,12 @@ package google
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
"google.golang.org/api/compute/v1"
|
"google.golang.org/api/compute/v1"
|
||||||
"regexp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -54,6 +56,11 @@ func resourceComputeTargetHttpsProxy() *schema.Resource {
|
|||||||
Computed: true,
|
Computed: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"proxy_id": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"project": &schema.Schema{
|
"project": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -171,6 +178,7 @@ func resourceComputeTargetHttpsProxyRead(d *schema.ResourceData, meta interface{
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.Set("ssl_certificates", proxy.SslCertificates)
|
d.Set("ssl_certificates", proxy.SslCertificates)
|
||||||
|
d.Set("proxy_id", strconv.FormatUint(proxy.Id, 10))
|
||||||
d.Set("self_link", proxy.SelfLink)
|
d.Set("self_link", proxy.SelfLink)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -2,6 +2,7 @@ package google
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
"google.golang.org/api/compute/v1"
|
"google.golang.org/api/compute/v1"
|
||||||
@ -62,6 +63,11 @@ func resourceComputeUrlMap() *schema.Resource {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"map_id": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"path_matcher": &schema.Schema{
|
"path_matcher": &schema.Schema{
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -309,6 +315,7 @@ func resourceComputeUrlMapRead(d *schema.ResourceData, meta interface{}) error {
|
|||||||
|
|
||||||
d.SetId(name)
|
d.SetId(name)
|
||||||
d.Set("self_link", urlMap.SelfLink)
|
d.Set("self_link", urlMap.SelfLink)
|
||||||
|
d.Set("map_id", strconv.FormatUint(urlMap.Id, 10))
|
||||||
d.Set("fingerprint", urlMap.Fingerprint)
|
d.Set("fingerprint", urlMap.Fingerprint)
|
||||||
|
|
||||||
hostRuleMap := make(map[string]*compute.HostRule)
|
hostRuleMap := make(map[string]*compute.HostRule)
|
||||||
|
@ -84,7 +84,7 @@ The following arguments are supported:
|
|||||||
In addition to the arguments listed above, the following computed attributes are
|
In addition to the arguments listed above, the following computed attributes are
|
||||||
exported:
|
exported:
|
||||||
|
|
||||||
* `id` - A unique ID for the certificated, assigned by GCE.
|
* `certificate_id` - A unique ID for the certificate, assigned by GCE.
|
||||||
|
|
||||||
* `self_link` - The URI of the created resource.
|
* `self_link` - The URI of the created resource.
|
||||||
|
|
||||||
|
@ -86,6 +86,6 @@ The following arguments are supported:
|
|||||||
In addition to the arguments listed above, the following computed attributes are
|
In addition to the arguments listed above, the following computed attributes are
|
||||||
exported:
|
exported:
|
||||||
|
|
||||||
* `id` - A unique ID assigned by GCE.
|
* `proxy_id` - A unique ID assigned by GCE.
|
||||||
|
|
||||||
* `self_link` - The URI of the created resource.
|
* `self_link` - The URI of the created resource.
|
||||||
|
@ -96,6 +96,6 @@ The following arguments are supported:
|
|||||||
In addition to the arguments listed above, the following computed attributes are
|
In addition to the arguments listed above, the following computed attributes are
|
||||||
exported:
|
exported:
|
||||||
|
|
||||||
* `id` - A unique ID assigned by GCE.
|
* `proxy_id` - A unique ID assigned by GCE.
|
||||||
|
|
||||||
* `self_link` - The URI of the created resource.
|
* `self_link` - The URI of the created resource.
|
||||||
|
@ -157,6 +157,6 @@ exported:
|
|||||||
|
|
||||||
* `fingerprint` - The unique fingerprint for this resource.
|
* `fingerprint` - The unique fingerprint for this resource.
|
||||||
|
|
||||||
* `id` - The GCE assigned ID of the resource.
|
* `map_id` - The GCE assigned ID of the resource.
|
||||||
|
|
||||||
* `self_link` - The URI of the created resource.
|
* `self_link` - The URI of the created resource.
|
||||||
|
Loading…
Reference in New Issue
Block a user