Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate name_prefix #1035

Merged
merged 2 commits into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions google/resource_compute_instance_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func resourceComputeInstanceTemplate() *schema.Resource {
"name_prefix": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
// https://cloud.google.com/compute/docs/reference/latest/instanceTemplates#resource
Expand All @@ -51,6 +52,8 @@ func resourceComputeInstanceTemplate() *schema.Resource {
}
return
},
Deprecated: "Use the random provider instead. See migration instructions at " +
"https://github.com/terraform-providers/terraform-provider-google/issues/1054#issuecomment-377390209",
},

"disk": &schema.Schema{
Expand Down
3 changes: 3 additions & 0 deletions google/resource_compute_ssl_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func resourceComputeSslCertificate() *schema.Resource {
"name_prefix": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
// https://cloud.google.com/compute/docs/reference/latest/sslCertificates#resource
Expand All @@ -50,6 +51,8 @@ func resourceComputeSslCertificate() *schema.Resource {
}
return
},
Deprecated: "Use the random provider instead. See migration instructions at " +
"https://github.com/terraform-providers/terraform-provider-google/issues/1054#issuecomment-377390209",
},

"private_key": &schema.Schema{
Expand Down
3 changes: 3 additions & 0 deletions google/resource_container_node_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ var schemaNodePool = map[string]*schema.Schema{
"name_prefix": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Deprecated: "Use the random provider instead. See migration instructions at " +
"https://github.com/terraform-providers/terraform-provider-google/issues/1054#issuecomment-377390209",
},

"node_config": schemaNodeConfig,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/compute_instance_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The following arguments are supported:
* `name` - (Optional) The name of the instance template. If you leave
this blank, Terraform will auto-generate a unique name.

* `name_prefix` - (Optional) Creates a unique name beginning with the specified
* `name_prefix` - (Deprecated, Optional) Creates a unique name beginning with the specified
prefix. Conflicts with `name`.

* `can_ip_forward` - (Optional) Whether to allow sending and receiving of
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/compute_ssl_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following arguments are supported:
* `name` - (Optional) A unique name for the SSL certificate. If you leave
this blank, Terraform will auto-generate a unique name.

* `name_prefix` - (Optional) Creates a unique name beginning with the specified
* `name_prefix` - (Deprecated, Optional) Creates a unique name beginning with the specified
prefix. Conflicts with `name`.

* `description` - (Optional) An optional description of this resource.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/container_node_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ resource "google_container_cluster" "primary" {
* `name` - (Optional) The name of the node pool. If left blank, Terraform will
auto-generate a unique name.

* `name_prefix` - (Optional) Creates a unique name for the node pool beginning
* `name_prefix` - (Deprecated, Optional) Creates a unique name for the node pool beginning
with the specified prefix. Conflicts with `name`.

* `node_config` - (Optional) The node configuration of the pool. See
Expand Down