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

docs: mark resource alicloud_havip as deprecated, improve examples #7427

Merged
merged 1 commit into from
Jul 30, 2024
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
34 changes: 23 additions & 11 deletions website/docs/r/adb_resource_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,53 @@ Basic Usage

```terraform
variable "name" {
default = "terraform-example"
default = "tf_example"
}
data "alicloud_adb_zones" "default" {
}
data "alicloud_resource_manager_resource_groups" "default" {
status = "OK"
}
resource "alicloud_vpc" "default" {
vpc_name = var.name
cidr_block = "192.168.0.0/16"
cidr_block = "10.4.0.0/16"
}
resource "alicloud_vswitch" "default" {
vswitch_name = var.name
vpc_id = alicloud_vpc.default.id
cidr_block = "192.168.192.0/24"
zone_id = data.alicloud_adb_zones.default.zones.0.id
cidr_block = "10.4.0.0/24"
zone_id = data.alicloud_adb_zones.default.zones[0].id
vswitch_name = var.name
}
resource "alicloud_adb_db_cluster" "default" {
compute_resource = "32Core128GB"
compute_resource = "48Core192GB"
db_cluster_category = "MixedStorage"
db_cluster_version = "3.0"
db_node_class = "E32"
db_node_storage = 100
description = var.name
elastic_io_resource = 1
maintain_time = "04:00Z-05:00Z"
mode = "flexible"
payment_type = "PayAsYouGo"
resource_group_id = data.alicloud_resource_manager_resource_groups.default.ids.0
security_ips = ["10.168.1.12", "10.168.1.11"]
vpc_id = alicloud_vpc.default.id
vswitch_id = alicloud_vswitch.default.id
zone_id = data.alicloud_adb_zones.default.zones.0.id
zone_id = data.alicloud_adb_zones.default.zones[0].id
tags = {
Created = "TF",
For = "example",
}
}
resource "alicloud_adb_resource_group" "default" {
db_cluster_id = alicloud_adb_db_cluster.default.id
group_name = var.name
group_name = "TF_EXAMPLE"
group_type = "batch"
node_num = 1
node_num = 0
db_cluster_id = alicloud_adb_db_cluster.default.id
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/alb_listener.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data "alicloud_instance_types" "default" {
}

data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/alb_server_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data "alicloud_instance_types" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/api_gateway_vpc_access.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "alicloud_security_group" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cen_route_entry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data "alicloud_instance_types" "example" {
memory_size = 2
}
data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data "alicloud_instance_types" "default" {
}

data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
16 changes: 7 additions & 9 deletions website/docs/r/cloud_storage_gateway_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,26 @@ variable "name" {
default = "tf-example"
}
data "alicloud_zones" "default" {
available_resource_creation = "VSwitch"
}
resource "random_uuid" "default" {
}
resource "alicloud_cloud_storage_gateway_storage_bundle" "default" {
storage_bundle_name = substr("tf-example-${replace(random_uuid.default.result, "-", "")}", 0, 16)
}
resource "alicloud_vpc" "default" {
vpc_name = var.name
cidr_block = "172.16.0.0/12"
}
data "alicloud_zones" "default" {
available_resource_creation = "VSwitch"
}
resource "alicloud_vswitch" "default" {
vpc_id = alicloud_vpc.default.id
cidr_block = "172.16.0.0/21"
zone_id = data.alicloud_zones.default.zones[0].id
vswitch_name = var.name
}
resource "alicloud_cloud_storage_gateway_storage_bundle" "default" {
storage_bundle_name = substr("tf-example-${replace(random_uuid.default.result, "-", "")}", 0, 16)
}
resource "alicloud_cloud_storage_gateway_gateway" "default" {
gateway_name = var.name
description = var.name
Expand All @@ -55,6 +52,7 @@ resource "alicloud_cloud_storage_gateway_gateway" "default" {
payment_type = "PayAsYouGo"
vswitch_id = alicloud_vswitch.default.id
release_after_expiration = false
public_network_bandwidth = 40
storage_bundle_id = alicloud_cloud_storage_gateway_storage_bundle.default.id
location = "Cloud"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,43 @@ variable "name" {
default = "tf-example"
}

data "alicloud_cloud_storage_gateway_stocks" "default" {
gateway_class = "Standard"
resource "random_uuid" "default" {
}
resource "alicloud_cloud_storage_gateway_storage_bundle" "default" {
storage_bundle_name = substr("tf-example-${replace(random_uuid.default.result, "-", "")}", 0, 16)
}

resource "alicloud_vpc" "default" {
vpc_name = var.name
cidr_block = "172.16.0.0/16"
cidr_block = "172.16.0.0/12"
}
data "alicloud_cloud_storage_gateway_stocks" "default" {
gateway_class = "Standard"
}

resource "alicloud_vswitch" "default" {
vpc_id = alicloud_vpc.default.id
cidr_block = "172.16.0.0/24"
cidr_block = "172.16.0.0/21"
zone_id = data.alicloud_cloud_storage_gateway_stocks.default.stocks.0.zone_id
vswitch_name = var.name
}

resource "alicloud_cloud_storage_gateway_storage_bundle" "default" {
storage_bundle_name = var.name
}

resource "alicloud_cloud_storage_gateway_gateway" "default" {
gateway_name = var.name
description = var.name
gateway_class = "Standard"
type = "File"
payment_type = "PayAsYouGo"
vswitch_id = alicloud_vswitch.default.id
release_after_expiration = true
public_network_bandwidth = 40
storage_bundle_id = alicloud_cloud_storage_gateway_storage_bundle.default.id
location = "Cloud"
gateway_name = var.name
}

resource "alicloud_cloud_storage_gateway_gateway_cache_disk" "default" {
cache_disk_category = "cloud_efficiency"
gateway_id = alicloud_cloud_storage_gateway_gateway.default.id
cache_disk_size_in_gb = 50
cache_disk_category = "cloud_efficiency"
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cms_metric_rule_black_list.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data "alicloud_instance_types" "default" {
memory_size = 2
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}
Expand Down
4 changes: 0 additions & 4 deletions website/docs/r/common_bandwidth_package.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ For information about CBWP Common Bandwidth Package and how to use it, see [What
Basic Usage

```terraform
provider "alicloud" {
region = "cn-hangzhou"
}
variable "name" {
default = "terraform-example"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ddos_basic_threshold.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "alicloud_instance_types" "default" {
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/ddosbgp_ip.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ variable "name" {
default = "tf-example"
}
data "alicloud_resource_manager_resource_groups" "default" {}
data "alicloud_account" "current" {}
resource "alicloud_ddosbgp_instance" "instance" {
name = var.name
base_bandwidth = 20
Expand All @@ -47,7 +46,6 @@ resource "alicloud_ddosbgp_ip" "default" {
instance_id = alicloud_ddosbgp_instance.instance.id
ip = alicloud_eip_address.default.ip_address
resource_group_id = data.alicloud_resource_manager_resource_groups.default.groups.0.id
member_uid = data.alicloud_account.current.id
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_disk_attachment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "alicloud_security_group" "default" {
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_image_pipeline.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data "alicloud_zones" "default" {
available_resource_creation = "VSwitch"
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_instance_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ data "alicloud_instance_types" "default" {
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_invocation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data "alicloud_instance_types" "default" {
availability_zone = data.alicloud_zones.default.zones.0.id
}
data "alicloud_images" "default" {
name_regex = "^ubuntu"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_key_pair_attachment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "alicloud_instance_types" "example" {
}
data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_launch_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data "alicloud_instance_types" "default" {
}

data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "alicloud_security_group" "default" {
}

data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_snapshot.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data "alicloud_instance_types" "default" {
availability_zone = data.alicloud_zones.default.zones.0.id
}
data "alicloud_images" "default" {
name_regex = "^ubuntu"
name_regex = "^ubuntu_18.*64"
most_recent = true
owners = "system"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data "alicloud_zones" "default" {
available_resource_creation = "VSwitch"
}
data "alicloud_images" "default" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}
data "alicloud_instance_types" "default" {
Expand Down
5 changes: 2 additions & 3 deletions website/docs/r/eip_association.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ data "alicloud_instance_types" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
owners = "system"
instance_type = data.alicloud_instance_types.example.instance_types.0.id
name_regex = "^ubuntu_18.*64"
owners = "system"
}

resource "alicloud_vpc" "example" {
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/ga_basic_accelerator.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Basic Usage

```terraform
resource "alicloud_ga_basic_accelerator" "default" {
bandwidth_billing_type = "BandwidthPackage"
auto_pay = true
duration = 1
pricing_cycle = "Month"
auto_use_coupon = "true"
basic_accelerator_name = "tf-example-value"
description = "tf-example-value"
bandwidth_billing_type = "BandwidthPackage"
auto_pay = true
auto_use_coupon = "true"
}
```

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/havip.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Provides a HaVip resource, see [What is HAVIP](https://www.alibabacloud.com/help

-> **NOTE:** Available since v1.18.0.

-> **DEPRECATED:** This resource has been renamed to [alicloud_vpc_ha_vip](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/vpc_ha_vip) from version 1.205.0.

## Example Usage

Basic Usage
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/havip_attachment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data "alicloud_instance_types" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hbr_ecs_backup_client.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "alicloud_instance_types" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hbr_ecs_backup_plan.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "alicloud_instance_types" "example" {
}

data "alicloud_images" "example" {
name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
name_regex = "^ubuntu_18.*64"
owners = "system"
}

Expand Down
Loading
Loading