Skip to content

Commit

Permalink
docs(smn/sms/swr): fix docs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Sep 28, 2023
1 parent 07e6b32 commit 230c5d2
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 24 deletions.
9 changes: 7 additions & 2 deletions docs/data-sources/smn_topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ The following arguments are supported:

* `display_name` - (Optional, String) Specifies the topic display name.

## Attributes Reference
* `enterprise_project_id` - (Optional, String) Specifies the enterprise project id of the topic.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The data source ID.

* `topics` - An array of SMN topics found. Structure is documented below.
* `topics` - An array of SMN topics found. The [topics](#smn_topics) object structure is documented below.

<a name="smn_topics"></a>
The `topics` block supports:

* `name` - The name of the topic.
Expand All @@ -47,6 +50,8 @@ The `topics` block supports:

* `display_name` - The topic display name.

* `enterprise_project_id` - The enterprise project id of the topic.

* `push_policy` - Message pushing policy.
+ **0**: indicates that the message sending fails and the message is cached in the queue.
+ **1**: indicates that the failed message is discarded.
14 changes: 8 additions & 6 deletions docs/data-sources/sms_source_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ The following arguments are supported:

* `name` - (Optional, String) Specifies the name of the source server.

* `status` - (Optional, String) Specifies the status of the source server.
* `state` - (Optional, String) Specifies the status of the source server.

* `ip` - (Optional, String) Specifies the IP address of the source server.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The data source ID.

* `servers` - An array of SMS source servers found. Structure is documented below.
* `servers` - An array of SMS source servers found. The [servers](#sms_servers) object structure is documented below.

<a name="sms_servers"></a>
The `servers` block supports:

* `name` - The name of the source server.
Expand All @@ -44,7 +45,7 @@ The `servers` block supports:

* `ip` - The IP address of the source server.

* `status` - The status of the source server.
* `state` - The status of the source server.

* `connected` - Whether the source server is properly connected to SMS.

Expand All @@ -60,9 +61,10 @@ The `servers` block supports:

* `memory` - The memory size in MB.

* `disks` - The disk information of the source server. Structure is documented below.
* `disks` - The disk information of the source server. The [disks](#sms_disks) object structure is documented below.

The `disks` blocks support:
<a name="sms_disks"></a>
The `disks` block supports:

* `name` - The disk name, for example, /dev/vda.

Expand Down
7 changes: 5 additions & 2 deletions docs/resources/smn_topic_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The following arguments are supported:
Changing this parameter will create a new resource.

* `display_name` - (Optional, String) Specifies the topic display name, which is presented as the name of the email
sender in an email message. The name can contains of 0 to 192 characters.
sender in an email message. The name can contain of 0 to 192 characters.

* `users_publish_allowed` - (Optional, String) Specifies the users who can publish messages to this topic.
The value can be **\*** which indicates all users or user account URNs separated by comma(,). The format of
Expand All @@ -56,7 +56,10 @@ The following arguments are supported:
* `introduction` - (Optional, String) Specifies the introduction of the topic,
this will be contained in the subscription invitation.

## Attributes Reference
* `enterprise_project_id` - (Optional, String, ForceNew) Specifies the enterprise project id of the SMN Topic, Value 0
indicates the default enterprise project. Changing this parameter will create a new resource.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

Expand Down
10 changes: 8 additions & 2 deletions docs/resources/sms_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,27 @@ The `physical_volumes` block supports:
* `uuid` - (Optional, String, ForceNew) Specifies the GUID of the volume.
Changing this parameter will create a new resource.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The resource ID in UUID format.

* `state` - The status of the migration task.

* `enterprise_project_id` - The enterprise project id of the target server.

* `target_server_name` - The name of the target server.

* `migrate_speed` - The migration rate, in MB/s.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 5 minute.
* `create` - Default is 5 minutes.
* `update` - Default is 5 minutes.
* `delete` - Default is 5 minutes.

## Import

Expand Down
11 changes: 9 additions & 2 deletions docs/resources/swr_organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ The following arguments are supported:
* `name` - (Required, String, ForceNew) Specifies the name of the organization. The organization name must be globally
unique. Changing this creates a new resource.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - ID of the organization.

* `creator` - The creator user name of the organization.
* `creator` - The creator username of the organization.

* `permission` - The permission of the organization, the value can be Manage, Write, and Read.

* `login_server` - The URL that can be used to log into the container registry.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 5 minutes.
* `delete` - Default is 5 minutes.

## Import

Organizations can be imported using the `name`, e.g.
Expand Down
18 changes: 14 additions & 4 deletions docs/resources/swr_organization_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ The following arguments are supported:
Changing this creates a new resource.

* `users` - (Required, List) Specifies the users to access to the organization (namespace).
Structure is documented below.
The [users](#swr_users) object structure is documented below.

<a name="swr_users"></a>
The `users` block supports:

* `permission` - (Required, String) Specifies the permission of the existing IAM user.
Expand All @@ -54,16 +55,18 @@ The `users` block supports:

* `user_name` - (Optional, String) Specifies the name of the existing IAM user.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - ID of the resource. The value is the name of the organization.

* `creator` - The creator user name of the organization.
* `creator` - The creator username of the organization.

* `self_permission` - The permission informations of current user.
* `self_permission` - The permission information of current user. The [self_permission](#swr_self_permission) object
structure is documented below.

<a name="swr_self_permission"></a>
The `self_permission` block supports:

* `user_name` - The name of current user.
Expand All @@ -72,6 +75,13 @@ The `self_permission` block supports:

* `permission` - The permission of current user.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 5 minutes.
* `delete` - Default is 5 minutes.

## Import

Organization Permissions can be imported using the `id` (organization name), e.g.
Expand Down
10 changes: 9 additions & 1 deletion docs/resources/swr_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following arguments are supported:
* `category` - (Optional, String) Specifies the category of the repository.
The value can be `app_server`, `linux`, `framework_app`, `database`, `lang`, `other`, `windows`, `arm`.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

Expand All @@ -57,6 +57,14 @@ In addition to all arguments above, the following attributes are exported:

* `size` - Repository size.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 2 minutes.
* `update` - Default is 2 minutes.
* `delete` - Default is 2 minutes.

## Import

Repository can be imported using the organization name and repository name separated by a slash, e.g.:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/swr_repository_sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following arguments are supported:

* `description` - (Optional, String) Specifies the description of the repository sharing.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ func TestAccDataTopics_basic(t *testing.T) {
func testAccDataTopicsConfig_basic(rName string) string {
return fmt.Sprintf(`
resource "flexibleengine_smn_topic_v2" "topic_1" {
name = "%[1]s"
display_name = "The display name of %[1]s"
name = "%[1]s"
display_name = "The display name of %[1]s"
enterprise_project_id = 0
}
data "flexibleengine_smn_topics" "test" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ func TestAccSMNV2Topic_policies(t *testing.T) {
func testAccSMNV2TopicConfig_basic(rName string) string {
return fmt.Sprintf(`
resource "flexibleengine_smn_topic_v2" "topic_1" {
name = "%s"
display_name = "The display name of %s"
name = "%s"
display_name = "The display name of %s"
enterprise_project_id = 0
}
`, rName, rName)
}
Expand Down

0 comments on commit 230c5d2

Please sign in to comment.