Skip to content

Commit ef26416

Browse files
authored
Merge pull request #39 from shanye997/docExample
add doc examples for AMQP, DBAudit
2 parents ea9b64f + cda46e6 commit ef26416

File tree

21 files changed

+341
-3
lines changed

21 files changed

+341
-3
lines changed

.github/workflows/weekly_e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Weekly E2E Test Check
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '0 10 * * 0'
5+
- cron: '0 0 * * 0'
66

77

88
jobs:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_yundun_dbaudit_instance` resource.
5+
6+
## Providers
7+
8+
| Name | Version |
9+
|------|---------|
10+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | 1.213.1 |
11+
12+
## Resources
13+
14+
| Name | Type |
15+
|------|------|
16+
| [alicloud_yundun_dbaudit_instance.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/yundun_dbaudit_instance) | resource |
17+
| [alicloud_vpcs.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/vpcs) | data source |
18+
| [alicloud_vswitches.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/vswitches) | data source |
19+
| [alicloud_zones.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/zones) | data source |
20+
21+
## Inputs
22+
23+
No inputs.
24+
<!-- END_TF_DOCS -->
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
provider "alicloud" {
2+
endpoints {
3+
bssopenapi = "business.aliyuncs.com"
4+
}
5+
region = "cn-hangzhou"
6+
}
7+
8+
data "alicloud_zones" "default" {
9+
available_resource_creation = "VSwitch"
10+
}
11+
12+
data "alicloud_vpcs" "default" {
13+
name_regex = "default-NODELETING"
14+
}
15+
data "alicloud_vswitches" "default" {
16+
vpc_id = data.alicloud_vpcs.default.ids.0
17+
zone_id = data.alicloud_zones.default.zones.0.id
18+
}
19+
20+
resource "alicloud_yundun_dbaudit_instance" "default" {
21+
description = "tf-example"
22+
plan_code = "alpha.professional"
23+
period = "1"
24+
vswitch_id = data.alicloud_vswitches.default.ids.0
25+
}
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+
}

quickstarts/Cloud_Storage_Gateway/101-cloud-storage-gateway-gateway-logging-docs-Example/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ resource "alicloud_cloud_storage_gateway_gateway_logging" "default" {
5252
gateway_id = alicloud_cloud_storage_gateway_gateway.default.id
5353
sls_logstore = alicloud_log_store.default.name
5454
sls_project = alicloud_log_project.default.name
55-
}
55+
}
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_amqp_binding` 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_amqp_binding.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_binding) | resource |
17+
| [alicloud_amqp_exchange.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_exchange) | resource |
18+
| [alicloud_amqp_instance.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_instance) | resource |
19+
| [alicloud_amqp_queue.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_queue) | resource |
20+
| [alicloud_amqp_virtual_host.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_virtual_host) | resource |
21+
22+
## Inputs
23+
24+
No inputs.
25+
<!-- END_TF_DOCS -->
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
resource "alicloud_amqp_instance" "default" {
2+
instance_type = "enterprise"
3+
max_tps = 3000
4+
queue_capacity = 200
5+
storage_size = 700
6+
support_eip = false
7+
max_eip_tps = 128
8+
payment_type = "Subscription"
9+
period = 1
10+
}
11+
12+
resource "alicloud_amqp_virtual_host" "default" {
13+
instance_id = alicloud_amqp_instance.default.id
14+
virtual_host_name = "tf-example"
15+
}
16+
17+
resource "alicloud_amqp_exchange" "default" {
18+
auto_delete_state = false
19+
exchange_name = "tf-example"
20+
exchange_type = "DIRECT"
21+
instance_id = alicloud_amqp_instance.default.id
22+
internal = false
23+
virtual_host_name = alicloud_amqp_virtual_host.default.virtual_host_name
24+
}
25+
26+
resource "alicloud_amqp_queue" "default" {
27+
instance_id = alicloud_amqp_instance.default.id
28+
queue_name = "tf-example"
29+
virtual_host_name = alicloud_amqp_virtual_host.default.virtual_host_name
30+
}
31+
32+
resource "alicloud_amqp_binding" "default" {
33+
argument = "x-match:all"
34+
binding_key = alicloud_amqp_queue.default.queue_name
35+
binding_type = "QUEUE"
36+
destination_name = "tf-example"
37+
instance_id = alicloud_amqp_instance.default.id
38+
source_exchange = alicloud_amqp_exchange.default.exchange_name
39+
virtual_host_name = alicloud_amqp_virtual_host.default.virtual_host_name
40+
}
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: 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_amqp_exchange` 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_amqp_exchange.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_exchange) | resource |
17+
| [alicloud_amqp_instance.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_instance) | resource |
18+
| [alicloud_amqp_virtual_host.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/amqp_virtual_host) | resource |
19+
20+
## Inputs
21+
22+
No inputs.
23+
<!-- END_TF_DOCS -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
resource "alicloud_amqp_instance" "default" {
2+
instance_type = "professional"
3+
max_tps = 1000
4+
queue_capacity = 50
5+
support_eip = true
6+
max_eip_tps = 128
7+
payment_type = "Subscription"
8+
period = 1
9+
}
10+
11+
resource "alicloud_amqp_virtual_host" "default" {
12+
instance_id = alicloud_amqp_instance.default.id
13+
virtual_host_name = "tf-example"
14+
}
15+
16+
resource "alicloud_amqp_exchange" "default" {
17+
auto_delete_state = false
18+
exchange_name = "tf-example"
19+
exchange_type = "DIRECT"
20+
instance_id = alicloud_amqp_instance.default.id
21+
internal = false
22+
virtual_host_name = alicloud_amqp_virtual_host.default.virtual_host_name
23+
}

0 commit comments

Comments
 (0)