diff --git a/docs/data-sources/dws_flavors.md b/docs/data-sources/dws_flavors.md index d2b8e062..3689f0ca 100644 --- a/docs/data-sources/dws_flavors.md +++ b/docs/data-sources/dws_flavors.md @@ -25,19 +25,48 @@ data "flexibleengine_dws_flavors" "flavor" { * `memory` - (Optional, String) Specifies the ram of the DWS node flavor in GB. -## Attributes Reference +* `datastore_type` - (Optional, String) The type of datastore. The options are as follows: + - **dws**: OLAP, elastic scaling, unlimited scaling of compute and storage capacity. + - **hybrid**: a single data warehouse used for transaction and analytics workloads, + in single-node or cluster mode. + - **stream**: built-in time series operators; up to 40:1 compression ratio; applicable to IoT services. + +## Attribute Reference In addition to all arguments above, the following attributes are exported: * `id` - Indicates a data source ID. -* `flavors` - Indicates the flavors information. Structure is documented below. +* `flavors` - Indicates the flavors information. The [flavors](#dws_flavors) object structure is documented below. -The `flavors` block contains: + +The `flavors` block supports: * `flavor_id` - The name of the DWS node flavor. It is referenced by **node_type** in `flexibleengine_dws_cluster_v1`. + * `vcpus` - Indicates the vcpus of the DWS node flavor. + * `memory` - Indicates the ram of the DWS node flavor in GB. + * `volumetype` - Indicates Disk type. + * `size` - Indicates the Disk size in GB. -* `availability_zone` - Indicates the availability zone where the node resides. + +* `availability_zones` - Indicates the availability zone where the node resides. + +* `datastore_type` - The type of datastore.The options are as follows: + - **dws**: OLAP, elastic scaling, unlimited scaling of compute and storage capacity. + - **hybrid**: a single data warehouse used for transaction and analytics workloads, + in single-node or cluster mode. + - **stream**: built-in time series operators; up to 40:1 compression ratio; applicable to IoT services. + +* `elastic_volume_specs` - The [elastic_volume_specs](#dws_elastic_volume_specs) object structure is documented below. + + +The `elastic_volume_specs` block supports: + +* `step` - Disk size increment step. + +* `min_size` - Minimum disk size. + +* `max_size` - Maximum disk size. diff --git a/docs/resources/dws_cluster_v1.md b/docs/resources/dws_cluster_v1.md index 0b0f7d4a..cb2ce4de 100644 --- a/docs/resources/dws_cluster_v1.md +++ b/docs/resources/dws_cluster_v1.md @@ -50,61 +50,71 @@ resource "flexibleengine_dws_cluster_v1" "cluster" { The following arguments are supported: -* `name` - (Required) Cluster name, which must be unique and contains 4 to 64 - characters, which consist of letters, digits, hyphens (-), or underscores - (_) only and must start with a letter. +* `region` - (Optional, String, ForceNew) Specifies the region in which to create the DWS cluster (v1) resource. + If omitted, the provider-level region will be used. Changing this will create a new DWS cluster (v1) resource. -* `node_type` - (Required) Node type. +* `name` - (Required, String, ForceNew) Cluster name, which must be unique and contains 4 to 64 + characters, which consist of letters, digits, hyphens (-), or underscores(_) only and must start with a letter. + Changing this will create a new resource. -* `number_of_node` - (Required) Number of nodes in a cluster. The value ranges - from 3 to 32. +* `node_type` - (Required, String, ForceNew) Node type.Changing this will create a new resource. -* `user_name` - (Required) Administrator username for logging in to a data +* `number_of_node` - (Required, Int, ForceNew) Number of nodes in a cluster. The value ranges from 3 to 32. + Changing this will create a new resource. + +* `user_name` - (Required, String, ForceNew) Administrator username for logging in to a data warehouse cluster The administrator username must: - Consist of lowercase letters, digits, or underscores. - Start with a lowercase letter or an underscore. - Contain 1 to 63 characters. - Cannot be a keyword of the DWS database. + Changing this will create a new resource. -* `user_pwd` - (Required) Administrator password for logging in to a data +* `user_pwd` - (Required, String, ForceNew) Administrator password for logging in to a data warehouse cluster. A password must conform to the following rules: - Contains 8 to 32 characters. - Cannot be the same as the username or the username written in reverse order. - Contains three types of lowercase letters, uppercase letters, digits and special characters ~!@#%^&*()-_=+|[{}];:,<.>/? + Changing this will create a new resource. -* `vpc_id` - (Required) VPC ID, which is used for configuring cluster network. +* `vpc_id` - (Required, String, ForceNew) VPC ID, which is used for configuring cluster network. + Changing this will create a new resource. -* `subnet_id` - (Required) The ID of the VPC Subnet, which is used for configuring cluster network. +* `subnet_id` - (Required, String, ForceNew) The ID of the VPC Subnet, which is used for configuring cluster network. + Changing this will create a new resource. -* `security_group_id` - (Required) ID of a security group. The ID is used for - configuring cluster network. +* `security_group_id` - (Required, String, ForceNew) ID of a security group. The ID is used for + configuring cluster network. Changing this will create a new resource. -* `port` - (Optional) Service port of a cluster (8000 to 10000). The default value is 8000. +* `port` - (Optional, Int, ForceNew) Service port of a cluster (8000 to 10000). The default value is 8000. + Changing this will create a new resource. -* `availability_zone` - (Optional) AZ in a cluster. +* `availability_zone` - (Optional, String, ForceNew) AZ in a cluster.Changing this will create a new resource. -* `public_ip` - (Optional) Public IP address. The object structure is documented below. +* `public_ip` - (Optional, List, ForceNew) Public IP address.The [public_ip](#dws_public_ip) object structure is + documented below. Changing this will create a new resource. + The `public_ip` block supports: -* `public_bind_type` - (Optional) Binding type of an EIP. The value can be +* `public_bind_type` - (Optional, String, ForceNew) Binding type of an EIP. The value can be either of the following: *auto_assign*, *not_use* and *bind_existing*. - The default value is *not_use*. + The default value is *not_use*. Changing this will create a new resource. -* `eip_id` - (Optional) EIP ID +* `eip_id` - (Optional, String, ForceNew) EIP ID. Changing this will create a new resource. -## Attributes Reference +## Attribute Reference In addition to all arguments above, the following attributes are exported: * `id` - Cluster ID * `endpoints` - The private network connection information about the cluster. - The object structure is documented below. + The [endpoints](#dws_endpoints) object structure is documented below. * `public_endpoints` - The public network connection information about the cluster. - The object structure is documented below. + The [public_endpoints](#dws_public_endpoints) object structure is documented below. * `private_ip` - List of private network IP address. @@ -120,6 +130,7 @@ In addition to all arguments above, the following attributes are exported: * `updated` - Last modification time of a cluster. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ. + The `endpoints` block supports: * `connect_info` - Private network connection information @@ -127,6 +138,7 @@ The `endpoints` block supports: * `jdbc_url` - JDBC URL. The following is the default format: jdbc:postgresql://< connect_info>/ + The `public_endpoints` block supports: * `public_connect_info` - Public network connection information @@ -134,6 +146,13 @@ The `public_endpoints` block supports: * `jdbc_url` - JDBC URL. The following is the default format: jdbc:postgresql://< public_connect_info>/ +## Timeouts + +This resource provides the following timeouts configuration options: + +* `create` - Default is 30 minutes. +* `delete` - Default is 30 minutes. + ## Import DWS cluster can be imported using the `id`, e.g. diff --git a/docs/resources/fw_firewall_group_v2.md b/docs/resources/fw_firewall_group_v2.md index 432bf383..955b7440 100644 --- a/docs/resources/fw_firewall_group_v2.md +++ b/docs/resources/fw_firewall_group_v2.md @@ -47,38 +47,28 @@ 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. +* `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 +* `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 +* `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 +* `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 +* `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. - -* `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 +* `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. -* `value_specs` - (Optional) Map of additional options. - -## Attributes Reference +## Attribute Reference The following attributes are exported: @@ -86,10 +76,16 @@ The following attributes are exported: * `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. diff --git a/docs/resources/fw_policy_v2.md b/docs/resources/fw_policy_v2.md index e239da45..64580bdb 100644 --- a/docs/resources/fw_policy_v2.md +++ b/docs/resources/fw_policy_v2.md @@ -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. +* `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 +* `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 +* `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 +* `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 +* `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" +* `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: @@ -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. diff --git a/docs/resources/fw_rule_v2.md b/docs/resources/fw_rule_v2.md index a408063a..d5bd713b 100644 --- a/docs/resources/fw_rule_v2.md +++ b/docs/resources/fw_rule_v2.md @@ -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. +* `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 +* `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 +* `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. +* `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 +* `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 +* `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 +* `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 +* `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 +* `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 +* `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" +* `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: @@ -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 diff --git a/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go b/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go index 68088c1f..61e6e952 100644 --- a/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go +++ b/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go @@ -52,6 +52,23 @@ func TestAccDwsFlavorsDataSource_memory(t *testing.T) { }) } +func TestAccDwsFlavorsDataSource_dataStoreType(t *testing.T) { + resourceName := "data.flexibleengine_dws_flavors.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: TestAccProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccDwsFlavorsDataSource_dataStoreType, + Check: resource.ComposeTestCheckFunc( + testAccCheckDwsFlavorDataSourceID(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "flavors.#"), + ), + }, + }, + }) +} + func TestAccDwsFlavorsDataSource_all(t *testing.T) { resourceName := "data.flexibleengine_dws_flavors.test" resource.ParallelTest(t, resource.TestCase{ @@ -125,6 +142,12 @@ data "flexibleengine_dws_flavors" "test" { memory = 64 } ` + +const testAccDwsFlavorsDataSource_dataStoreType = ` +data "flexibleengine_dws_flavors" "test" { + datastore_type = "hybrid" +}` + const testAccDwsFlavorsDataSource_all = ` data "flexibleengine_availability_zones" "test" {} diff --git a/flexibleengine/resource_flexibleengine_fw_firewall_group_v2.go b/flexibleengine/resource_flexibleengine_fw_firewall_group_v2.go index 4def0860..b31988a6 100644 --- a/flexibleengine/resource_flexibleengine_fw_firewall_group_v2.go +++ b/flexibleengine/resource_flexibleengine_fw_firewall_group_v2.go @@ -51,17 +51,6 @@ 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, @@ -69,10 +58,24 @@ func resourceFWFirewallGroupV2() *schema.Resource { 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", }, }, } diff --git a/flexibleengine/resource_flexibleengine_fw_policy_v2.go b/flexibleengine/resource_flexibleengine_fw_policy_v2.go index 3dd7c727..15750457 100644 --- a/flexibleengine/resource_flexibleengine_fw_policy_v2.go +++ b/flexibleengine/resource_flexibleengine_fw_policy_v2.go @@ -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", }, }, } diff --git a/flexibleengine/resource_flexibleengine_fw_rule_v2.go b/flexibleengine/resource_flexibleengine_fw_rule_v2.go index 7366b8bd..2b2abb09 100644 --- a/flexibleengine/resource_flexibleengine_fw_rule_v2.go +++ b/flexibleengine/resource_flexibleengine_fw_rule_v2.go @@ -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", }, }, }