Skip to content

Commit

Permalink
Merge pull request #2142 from modular-magician/codegen-pr-518
Browse files Browse the repository at this point in the history
Add deprecation message for generated beta fields.
  • Loading branch information
paddycarver authored Oct 4, 2018
2 parents b3ac3e3 + 83f9c94 commit fab1363
Show file tree
Hide file tree
Showing 40 changed files with 163 additions and 39 deletions.
3 changes: 3 additions & 0 deletions google/resource_binaryauthorization_attestor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func resourceBinaryAuthorizationAttestor() *schema.Resource {
Importer: &schema.ResourceImporter{
State: resourceBinaryAuthorizationAttestorImport,
},
DeprecationMessage: `This resource is in beta and will be removed from this provider.
Use the BinaryAuthorizationAttestor resource in the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta resources.`,

Schema: map[string]*schema.Schema{
"attestation_authority_note": {
Expand Down
3 changes: 3 additions & 0 deletions google/resource_binaryauthorization_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource {
Importer: &schema.ResourceImporter{
State: resourceBinaryAuthorizationPolicyImport,
},
DeprecationMessage: `This resource is in beta and will be removed from this provider.
Use the BinaryAuthorizationPolicy resource in the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta resources.`,

Schema: map[string]*schema.Schema{
"default_admission_rule": {
Expand Down
19 changes: 14 additions & 5 deletions google/resource_compute_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,19 @@ func resourceComputeAddress() *schema.Resource {
"labels": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"network_tier": {
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD", ""}, false),
},
"region": {
Expand All @@ -100,6 +106,9 @@ func resourceComputeAddress() *schema.Resource {
"label_fingerprint": {
Type: schema.TypeString,
Computed: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"users": {
Type: schema.TypeList,
Expand Down
6 changes: 6 additions & 0 deletions google/resource_compute_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,16 @@ func resourceComputeFirewall() *schema.Resource {
"disabled": {
Type: schema.TypeBool,
Optional: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"enable_logging": {
Type: schema.TypeBool,
Optional: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"priority": {
Type: schema.TypeInt,
Expand Down
28 changes: 20 additions & 8 deletions google/resource_compute_forwarding_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ func resourceComputeForwardingRule() *schema.Resource {
"labels": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"load_balancing_scheme": {
Type: schema.TypeString,
Expand All @@ -100,10 +103,13 @@ func resourceComputeForwardingRule() *schema.Resource {
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"network_tier": {
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD", ""}, false),
},
"port_range": {
Expand All @@ -130,9 +136,12 @@ func resourceComputeForwardingRule() *schema.Resource {
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"service_label": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
ValidateFunc: validateGCPName,
},
"subnetwork": {
Expand All @@ -158,6 +167,9 @@ func resourceComputeForwardingRule() *schema.Resource {
"service_name": {
Type: schema.TypeString,
Computed: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"project": {
Type: schema.TypeString,
Expand Down
35 changes: 25 additions & 10 deletions google/resource_compute_global_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ func resourceComputeGlobalAddress() *schema.Resource {
ForceNew: true,
},
"address_type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", "INTERNAL", ""}, false),
DiffSuppressFunc: emptyOrDefaultStringSuppress("EXTERNAL"),
Default: "EXTERNAL",
Expand All @@ -72,23 +75,35 @@ func resourceComputeGlobalAddress() *schema.Resource {
"labels": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"network": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"prefix_length": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"purpose": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
ValidateFunc: validation.StringInSlice([]string{"VPC_PEERING", ""}, false),
},
"address": {
Expand Down
3 changes: 3 additions & 0 deletions google/resource_compute_region_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func resourceComputeRegionDisk() *schema.Resource {
Importer: &schema.ResourceImporter{
State: resourceComputeRegionDiskImport,
},
DeprecationMessage: `This resource is in beta and will be removed from this provider.
Use the ComputeRegionDisk resource in the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta resources.`,

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(300 * time.Second),
Expand Down
9 changes: 9 additions & 0 deletions google/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func resourceComputeSubnetwork() *schema.Resource {
"enable_flow_logs": {
Type: schema.TypeBool,
Optional: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"private_ip_google_access": {
Type: schema.TypeBool,
Expand All @@ -118,6 +121,9 @@ func resourceComputeSubnetwork() *schema.Resource {
Type: schema.TypeList,
Computed: true,
Optional: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ip_cidr_range": {
Expand All @@ -140,6 +146,9 @@ func resourceComputeSubnetwork() *schema.Resource {
"fingerprint": {
Type: schema.TypeString,
Computed: true,
Deprecated: `This field is in beta and will be removed from this provider.
Use the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta fields.`,
},
"gateway_address": {
Type: schema.TypeString,
Expand Down
3 changes: 3 additions & 0 deletions google/resource_containeranalysis_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func resourceContainerAnalysisNote() *schema.Resource {
Importer: &schema.ResourceImporter{
State: resourceContainerAnalysisNoteImport,
},
DeprecationMessage: `This resource is in beta and will be removed from this provider.
Use the ContainerAnalysisNote resource in the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta resources.`,

Schema: map[string]*schema.Schema{
"attestation_authority": {
Expand Down
3 changes: 3 additions & 0 deletions google/resource_filestore_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func resourceFilestoreInstance() *schema.Resource {
Importer: &schema.ResourceImporter{
State: resourceFilestoreInstanceImport,
},
DeprecationMessage: `This resource is in beta and will be removed from this provider.
Use the FilestoreInstance resource in the terraform-provider-google-beta provider to continue using it.
See https://terraform.io/docs/provider/google/provider_versions.html for more details on beta resources.`,

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(300 * time.Second),
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/binaryauthorization_attestor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ description: |-

An attestor that attests to container image artifacts.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta resources.

To get more information about Attestor, see:

* [API documentation](https://cloud.google.com/binary-authorization/docs/reference/rest/)
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/binaryauthorization_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ description: |-

A policy for container image binary authorization.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta resources.

To get more information about Policy, see:

* [API documentation](https://cloud.google.com/binary-authorization/docs/reference/rest/)
Expand Down
10 changes: 7 additions & 3 deletions website/docs/r/compute_address.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ the instance is assigned a new internal IP address, either by Compute
Engine or by you. External IP addresses can be either ephemeral or
static.


To get more information about Address, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/beta/addresses)
Expand Down Expand Up @@ -108,7 +109,8 @@ The following arguments are supported:
(Optional)
The networking tier used for configuring this address. This field can
take the following values: PREMIUM or STANDARD. If this field is not
specified, it is assumed to be PREMIUM.
specified, it is assumed to be PREMIUM. This property is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta fields.

* `subnetwork` -
(Optional)
Expand All @@ -119,7 +121,8 @@ The following arguments are supported:

* `labels` -
(Optional)
Labels to apply to this address. A list of key->value pairs.
Labels to apply to this address. A list of key->value pairs. This property is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta fields.

* `region` -
(Optional)
Expand All @@ -142,7 +145,8 @@ In addition to the arguments listed above, the following computed attributes are

* `label_fingerprint` -
The fingerprint used for optimistic locking of this resource. Used
internally during updates.
internally during updates. This property is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta fields.
* `self_link` - The URI of the created resource.


Expand Down
1 change: 1 addition & 0 deletions website/docs/r/compute_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Autoscalers allow you to automatically scale virtual machine instances in
managed instance groups according to an autoscaling policy that you
define.


To get more information about Autoscaler, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/autoscalers)
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/compute_backend_bucket.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ backend bucket rather than a backend service. It can send requests for
static content to a Cloud Storage bucket and requests for dynamic content
a virtual machine instance.


To get more information about BackendBucket, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/latest/backendBuckets)
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/compute_disk.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ storage space requirements.
Add a persistent disk to your instance when you need reliable and
affordable storage with consistent performance characteristics.


To get more information about Disk, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/latest/disks)
Expand Down
7 changes: 5 additions & 2 deletions website/docs/r/compute_firewall.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ outgoing traffic and a default "deny" for incoming traffic. For all
networks except the default network, you must create any firewall rules
you need.


To get more information about Firewall, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/latest/firewalls)
Expand Down Expand Up @@ -122,13 +123,15 @@ The following arguments are supported:
Denotes whether the firewall rule is disabled, i.e not applied to the
network it is associated with. When set to true, the firewall rule is
not enforced and the network behaves as if it did not exist. If this
is unspecified, the firewall rule will be enabled.
is unspecified, the firewall rule will be enabled. This property is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta fields.

* `enable_logging` -
(Optional)
This field denotes whether to enable logging for a particular
firewall rule. If logging is enabled, logs will be exported to
Stackdriver.
Stackdriver. This property is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](http://terraform.io/docs/provider/google/provider_versions.html) for more details on beta fields.

* `priority` -
(Optional)
Expand Down
Loading

0 comments on commit fab1363

Please sign in to comment.