Skip to content

Commit

Permalink
docs(FW): fix docs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Sep 20, 2023
1 parent 07e6b32 commit 3a61617
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 120 deletions.
52 changes: 24 additions & 28 deletions docs/resources/fw_firewall_group_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,49 +47,45 @@ resource "flexibleengine_fw_firewall_group_v2" "firewall_group_1" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the v2 networking client.
A networking client is needed to create a firewall group. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall group.
* `region` - (Optional, String, ForceNew) The region in which to obtain the v2 networking client.
A networking client is needed to create a firewall group. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall group.

* `ingress_policy_id` - The ingress policy resource id for the firewall group. Changing
this updates the `ingress_policy_id` of an existing firewall group.
* `ingress_policy_id` - (Optional, String) The ingress policy resource id for the firewall group. Changing
this updates the `ingress_policy_id` of an existing firewall group.

* `egress_policy_id` - The egress policy resource id for the firewall group. Changing
this updates the `egress_policy_id` of an existing firewall group.
* `egress_policy_id` - (Optional, String) The egress policy resource id for the firewall group. Changing
this updates the `egress_policy_id` of an existing firewall group.

* `name` - (Optional) A name for the firewall group. Changing this
updates the `name` of an existing firewall group.
* `name` - (Optional, String) A name for the firewall group. Changing this
updates the `name` of an existing firewall group.

* `description` - (Required) A description for the firewall group. Changing this
updates the `description` of an existing firewall group.
* `description` - (Optional, String) A description for the firewall group. Changing this
updates the `description` of an existing firewall group.

* `admin_state_up` - (Optional) Administrative up/down status for the firewall group
(must be "true" or "false" if provided - defaults to "true").
Changing this updates the `admin_state_up` of an existing firewall group.
* `ports` - (Optional, List) Port(s) to associate this firewall group instance
with. Must be a list of strings. Changing this updates the associated routers
of an existing firewall group.

* `tenant_id` - (Optional) The owner of the floating IP. Required if admin wants
to create a firewall group for another tenant. Changing this creates a new
firewall group.

* `ports` - (Optional) Port(s) to associate this firewall group instance
with. Must be a list of strings. Changing this updates the associated routers
of an existing firewall group.

* `value_specs` - (Optional) Map of additional options.

## Attributes Reference
## Attribute Reference

The following attributes are exported:

* `region` - See Argument Reference above.
* `policy_id` - See Argument Reference above.
* `name` - See Argument Reference above.
* `description` - See Argument Reference above.
* `admin_state_up` - See Argument Reference above.
* `tenant_id` - See Argument Reference above.
* `ports` - See Argument Reference above.

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

Firewall Groups can be imported using the `id`, e.g.
Expand Down
52 changes: 28 additions & 24 deletions docs/resources/fw_policy_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,34 @@ resource "flexibleengine_fw_policy_v2" "policy_1" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the v2 networking client.
A networking client is needed to create a firewall policy. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall policy.
* `region` - (Optional, String, ForceNew) The region in which to obtain the v2 networking client.
A networking client is needed to create a firewall policy. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall policy.

* `name` - (Optional) A name for the firewall policy. Changing this
updates the `name` of an existing firewall policy.
* `name` - (Optional, String) A name for the firewall policy. Changing this
updates the `name` of an existing firewall policy.

* `description` - (Optional) A description for the firewall policy. Changing
this updates the `description` of an existing firewall policy.
* `description` - (Optional, String) A description for the firewall policy. Changing
this updates the `description` of an existing firewall policy.

* `rules` - (Optional) An array of one or more firewall rules that comprise
the policy. Changing this results in adding/removing rules from the
existing firewall policy.
* `rules` - (Optional, List) An array of one or more firewall rules that comprise
the policy. Changing this results in adding/removing rules from the
existing firewall policy.

* `audited` - (Optional) Audit status of the firewall policy
(must be "true" or "false" if provided - defaults to "false").
This status is set to "false" whenever the firewall policy or any of its
rules are changed. Changing this updates the `audited` status of an existing
firewall policy.
* `audited` - (Optional, Bool) Audit status of the firewall policy
(must be "true" or "false" if provided - defaults to "false").
This status is set to "false" whenever the firewall policy or any of its
rules are changed. Changing this updates the `audited` status of an existing
firewall policy.

* `shared` - (Optional) Sharing status of the firewall policy (must be "true"
or "false" if provided). If this is "true" the policy is visible to, and
can be used in, firewalls in other tenants. Changing this updates the
`shared` status of an existing firewall policy. Only administrative users
can specify if the policy should be shared.
* `shared` - (Optional, Bool) Sharing status of the firewall policy (must be "true"
or "false" if provided). If this is "true" the policy is visible to, and
can be used in, firewalls in other tenants. Changing this updates the
`shared` status of an existing firewall policy. Only administrative users
can specify if the policy should be shared.

* `value_specs` - (Optional) Map of additional options.

## Attributes Reference
## Attribute Reference

The following attributes are exported:

Expand All @@ -82,6 +80,12 @@ The following attributes are exported:
* `audited` - See Argument Reference above.
* `shared` - See Argument Reference above.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 10 minutes.

## Import

Firewall Policies can be imported using the `id`, e.g.
Expand Down
71 changes: 32 additions & 39 deletions docs/resources/fw_rule_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,55 +25,49 @@ resource "flexibleengine_fw_rule_v2" "rule_1" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the v2 networking client.
A Compute client is needed to create a firewall rule. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall rule.
* `region` - (Optional, String, ForceNew) The region in which to obtain the v2 networking client.
A Compute client is needed to create a firewall rule. If omitted, the
`region` argument of the provider is used. Changing this creates a new
firewall rule.

* `name` - (Optional) A unique name for the firewall rule. Changing this
updates the `name` of an existing firewall rule.
* `name` - (Optional, String) A unique name for the firewall rule. Changing this
updates the `name` of an existing firewall rule.

* `description` - (Optional) A description for the firewall rule. Changing this
updates the `description` of an existing firewall rule.
* `description` - (Optional, String) A description for the firewall rule. Changing this
updates the `description` of an existing firewall rule.

* `protocol` - (Required) The protocol type on which the firewall rule operates.
Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the
`protocol` of an existing firewall rule.
* `protocol` - (Required, String) The protocol type on which the firewall rule operates.
Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the
`protocol` of an existing firewall rule.

* `action` - (Required) Action to be taken ( must be "allow" or "deny") when the
firewall rule matches. Changing this updates the `action` of an existing
firewall rule.
* `action` - (Required, String) Action to be taken ( must be "allow" or "deny") when the
firewall rule matches. Changing this updates the `action` of an existing
firewall rule.

* `ip_version` - (Optional) IP version, either 4 (default) or 6. Changing this
updates the `ip_version` of an existing firewall rule.
* `ip_version` - (Optional, Int) IP version, either 4 (default) or 6. Changing this
updates the `ip_version` of an existing firewall rule.

* `source_ip_address` - (Optional) The source IP address on which the firewall
rule operates. Changing this updates the `source_ip_address` of an existing
firewall rule.
* `source_ip_address` - (Optional, String) The source IP address on which the firewall
rule operates. Changing this updates the `source_ip_address` of an existing
firewall rule.

* `destination_ip_address` - (Optional) The destination IP address on which the
firewall rule operates. Changing this updates the `destination_ip_address`
of an existing firewall rule.
* `destination_ip_address` - (Optional, String) The destination IP address on which the
firewall rule operates. Changing this updates the `destination_ip_address`
of an existing firewall rule.

* `source_port` - (Optional) The source port on which the firewall
rule operates. Changing this updates the `source_port` of an existing
firewall rule.
* `source_port` - (Optional, String) The source port on which the firewall
rule operates. Changing this updates the `source_port` of an existing
firewall rule.

* `destination_port` - (Optional) The destination port on which the firewall
rule operates. Changing this updates the `destination_port` of an existing
firewall rule.
* `destination_port` - (Optional, String) The destination port on which the firewall
rule operates. Changing this updates the `destination_port` of an existing
firewall rule.

* `enabled` - (Optional) Enabled status for the firewall rule (must be "true"
or "false" if provided - defaults to "true"). Changing this updates the
`enabled` status of an existing firewall rule.
* `enabled` - (Optional, Bool) Enabled status for the firewall rule (must be "true"
or "false" if provided - defaults to "true"). Changing this updates the
`enabled` status of an existing firewall rule.

* `tenant_id` - (Optional) The owner of the firewall rule. Required if admin
wants to create a firewall rule for another tenant. Changing this creates a
new firewall rule.

* `value_specs` - (Optional) Map of additional options.

## Attributes Reference
## Attribute Reference

The following attributes are exported:

Expand All @@ -88,7 +82,6 @@ The following attributes are exported:
* `source_port` - See Argument Reference above.
* `destination_port` - See Argument Reference above.
* `enabled` - See Argument Reference above.
* `tenant_id` - See Argument Reference above.

## Import

Expand Down
31 changes: 17 additions & 14 deletions flexibleengine/resource_flexibleengine_fw_firewall_group_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,31 @@ func resourceFWFirewallGroupV2() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"admin_state_up": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"tenant_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
"ports": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Computed: true,
},
"admin_state_up": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Deprecated: "admin_state_up is deprecated",
},
"tenant_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
Deprecated: "tenant_id is deprecated",
},
"value_specs": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Deprecated: "value_specs is deprecated",
},
},
}
Expand Down
20 changes: 11 additions & 9 deletions flexibleengine/resource_flexibleengine_fw_policy_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,23 @@ func resourceFWPolicyV2() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"tenant_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
"rules": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"tenant_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
Deprecated: "tenant_id is deprecated",
},
"value_specs": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Deprecated: "value_specs is deprecated",
},
},
}
Expand Down
14 changes: 8 additions & 6 deletions flexibleengine/resource_flexibleengine_fw_rule_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ func resourceFWRuleV2() *schema.Resource {
Default: true,
},
"tenant_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: "tenant_id is deprecated",
},
"value_specs": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Deprecated: "value_specs is deprecated",
},
},
}
Expand Down

0 comments on commit 3a61617

Please sign in to comment.