Skip to content

Commit cb1abb1

Browse files
authored
Merge pull request #35 from shanye997/docExample
add doc examples for OSS, Event_Bridge
2 parents ecea888 + 9490b39 commit cb1abb1

File tree

63 files changed

+1271
-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.

63 files changed

+1271
-0
lines changed
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_event_bridge_api_destination` 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_event_bridge_api_destination.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_api_destination) | resource |
17+
| [alicloud_event_bridge_connection.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_connection) | resource |
18+
19+
## Inputs
20+
21+
| Name | Description | Type | Default | Required |
22+
|------|-------------|------|---------|:--------:|
23+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"terraform-example"` | no |
24+
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `"cn-chengdu"` | no |
25+
<!-- END_TF_DOCS -->
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
provider "alicloud" {
2+
region = var.region
3+
}
4+
5+
variable "region" {
6+
default = "cn-chengdu"
7+
}
8+
9+
variable "name" {
10+
default = "terraform-example"
11+
}
12+
13+
resource "alicloud_event_bridge_connection" "default" {
14+
connection_name = var.name
15+
network_parameters {
16+
network_type = "PublicNetwork"
17+
}
18+
}
19+
20+
resource "alicloud_event_bridge_api_destination" "default" {
21+
connection_name = alicloud_event_bridge_connection.default.connection_name
22+
api_destination_name = var.name
23+
description = "test-api-destination-connection"
24+
http_api_parameters {
25+
endpoint = "http://127.0.0.1:8001"
26+
method = "POST"
27+
}
28+
}
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Introduction
3+
4+
This example is used to create a `alicloud_event_bridge_connection` 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_event_bridge_connection.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_connection) | resource |
17+
| [alicloud_security_group.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/security_group) | resource |
18+
| [alicloud_vpc.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/vpc) | resource |
19+
| [alicloud_vswitch.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/vswitch) | resource |
20+
| [alicloud_zones.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/zones) | data source |
21+
22+
## Inputs
23+
24+
| Name | Description | Type | Default | Required |
25+
|------|-------------|------|---------|:--------:|
26+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"terraform-example"` | no |
27+
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `"cn-chengdu"` | no |
28+
<!-- END_TF_DOCS -->
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
provider "alicloud" {
2+
region = var.region
3+
}
4+
5+
variable "region" {
6+
default = "cn-chengdu"
7+
}
8+
9+
variable "name" {
10+
default = "terraform-example"
11+
}
12+
13+
data "alicloud_zones" "default" {
14+
}
15+
16+
resource "alicloud_vpc" "default" {
17+
vpc_name = var.name
18+
cidr_block = "172.16.0.0/16"
19+
}
20+
21+
resource "alicloud_vswitch" "default" {
22+
vpc_id = alicloud_vpc.default.id
23+
cidr_block = "172.16.0.0/24"
24+
zone_id = data.alicloud_zones.default.zones[0].id
25+
vswitch_name = var.name
26+
}
27+
28+
resource "alicloud_security_group" "default" {
29+
name = var.name
30+
vpc_id = alicloud_vswitch.default.vpc_id
31+
}
32+
33+
resource "alicloud_event_bridge_connection" "default" {
34+
connection_name = var.name
35+
description = "test-connection-basic-pre"
36+
network_parameters {
37+
network_type = "PublicNetwork"
38+
vpc_id = alicloud_vpc.default.id
39+
vswitche_id = alicloud_vswitch.default.id
40+
security_group_id = alicloud_security_group.default.id
41+
}
42+
auth_parameters {
43+
authorization_type = "BASIC_AUTH"
44+
api_key_auth_parameters {
45+
api_key_name = "Token"
46+
api_key_value = "Token-value"
47+
}
48+
basic_auth_parameters {
49+
username = "admin"
50+
password = "admin"
51+
}
52+
oauth_parameters {
53+
authorization_endpoint = "http://127.0.0.1:8080"
54+
http_method = "POST"
55+
client_parameters {
56+
client_id = "ClientId"
57+
client_secret = "ClientSecret"
58+
}
59+
oauth_http_parameters {
60+
header_parameters {
61+
key = "name"
62+
value = "name"
63+
is_value_secret = "true"
64+
}
65+
body_parameters {
66+
key = "name"
67+
value = "name"
68+
is_value_secret = "true"
69+
}
70+
query_string_parameters {
71+
key = "name"
72+
value = "name"
73+
is_value_secret = "true"
74+
}
75+
}
76+
}
77+
}
78+
}
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_event_bridge_event_bus` 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_event_bridge_event_bus.example](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_event_bus) | 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "name" {
2+
default = "tf-example"
3+
}
4+
resource "alicloud_event_bridge_event_bus" "example" {
5+
event_bus_name = var.name
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_event_bridge_event_source` 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_event_bridge_event_bus.example](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_event_bus) | resource |
17+
| [alicloud_event_bridge_event_source.example](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/event_bridge_event_source) | resource |
18+
| [alicloud_mns_queue.example](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/mns_queue) | resource |
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)