Skip to content

Commit b682e54

Browse files
authored
Merge pull request #32 from shanye997/docExample
add doc examples for alb, ddosbgp, eip
2 parents a7846ec + 6def8cc commit b682e54

File tree

51 files changed

+1428
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1428
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_ddosbgp_instance` resource.
5+
6+
## Providers
7+
8+
| Name | Version |
9+
|------|---------|
10+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
11+
12+
## Resources
13+
14+
| Name | Type |
15+
|------|------|
16+
| [alicloud_ddosbgp_instance.instance](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ddosbgp_instance) | resource |
17+
18+
## Inputs
19+
20+
| Name | Description | Type | Default | Required |
21+
|------|-------------|------|---------|:--------:|
22+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"tf-example"` | no |
23+
<!-- END_TF_DOCS -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
provider "alicloud" {
2+
region = "cn-beijing"
3+
}
4+
5+
variable "name" {
6+
default = "tf-example"
7+
}
8+
9+
resource "alicloud_ddosbgp_instance" "instance" {
10+
name = var.name
11+
base_bandwidth = 20
12+
bandwidth = -1
13+
ip_count = 100
14+
ip_type = "IPv4"
15+
normal_bandwidth = 100
16+
type = "Enterprise"
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
required_providers {
3+
alicloud = {
4+
source = "aliyun/alicloud"
5+
}
6+
}
7+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_ddosbgp_ip` resource.
5+
6+
## Providers
7+
8+
| Name | Version |
9+
|------|---------|
10+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
11+
12+
## Resources
13+
14+
| Name | Type |
15+
|------|------|
16+
| [alicloud_ddosbgp_instance.instance](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ddosbgp_instance) | resource |
17+
| [alicloud_ddosbgp_ip.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ddosbgp_ip) | resource |
18+
| [alicloud_eip_address.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/eip_address) | resource |
19+
| [alicloud_resource_manager_resource_groups.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/resource_manager_resource_groups) | data source |
20+
21+
## Inputs
22+
23+
| Name | Description | Type | Default | Required |
24+
|------|-------------|------|---------|:--------:|
25+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"tf-example"` | no |
26+
<!-- END_TF_DOCS -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
provider "alicloud" {
2+
region = "cn-beijing"
3+
}
4+
5+
variable "name" {
6+
default = "tf-example"
7+
}
8+
data "alicloud_resource_manager_resource_groups" "default" {}
9+
resource "alicloud_ddosbgp_instance" "instance" {
10+
name = var.name
11+
base_bandwidth = 20
12+
bandwidth = -1
13+
ip_count = 100
14+
ip_type = "IPv4"
15+
normal_bandwidth = 100
16+
type = "Enterprise"
17+
}
18+
19+
resource "alicloud_eip_address" "default" {
20+
address_name = var.name
21+
}
22+
23+
resource "alicloud_ddosbgp_ip" "default" {
24+
instance_id = alicloud_ddosbgp_instance.instance.id
25+
ip = alicloud_eip_address.default.ip_address
26+
resource_group_id = data.alicloud_resource_manager_resource_groups.default.groups.0.id
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
required_providers {
3+
alicloud = {
4+
source = "aliyun/alicloud"
5+
}
6+
}
7+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_alb_acl` resource.
5+
6+
## Providers
7+
8+
| Name | Version |
9+
|------|---------|
10+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
11+
12+
## Resources
13+
14+
| Name | Type |
15+
|------|------|
16+
| [alicloud_alb_acl.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/alb_acl) | resource |
17+
| [alicloud_resource_manager_resource_groups.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/resource_manager_resource_groups) | data source |
18+
19+
## Inputs
20+
21+
No inputs.
22+
<!-- END_TF_DOCS -->
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
data "alicloud_resource_manager_resource_groups" "default" {}
2+
3+
resource "alicloud_alb_acl" "default" {
4+
acl_name = "tf_example"
5+
resource_group_id = data.alicloud_resource_manager_resource_groups.default.groups.0.id
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
required_providers {
3+
alicloud = {
4+
source = "aliyun/alicloud"
5+
}
6+
}
7+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_alb_acl_entry_attachment` resource.
5+
6+
## Providers
7+
8+
| Name | Version |
9+
|------|---------|
10+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
11+
12+
## Resources
13+
14+
| Name | Type |
15+
|------|------|
16+
| [alicloud_alb_acl.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/alb_acl) | resource |
17+
| [alicloud_alb_acl_entry_attachment.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/alb_acl_entry_attachment) | resource |
18+
| [alicloud_resource_manager_resource_groups.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/resource_manager_resource_groups) | data source |
19+
20+
## Inputs
21+
22+
| Name | Description | Type | Default | Required |
23+
|------|-------------|------|---------|:--------:|
24+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"tf_example"` | no |
25+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)