- Sbercloud Quickstart
- Add environment variables for terraform authentication in Sbercloud
export SBC_ACCESS_KEY="xxxx-xxx-xxx"
export SBC_SECRET_KEY="xxxx-xxx-xxx"
provider "sbercloud" {
auth_url = "https://iam.ru-moscow-1.hc.sbercloud.ru/v3"
region = "ru-moscow-1"
}
module "dcs" {
source = "tf-cloud-modules/dcs/sbercloud"
name = "dcs-test"
availability_zones = ["ru-moscow-1a"]
capacity = 1
engine = "Redis"
engine_version = "6.0"
flavor = "redis.ha.xu1.large.r2.1"
security_group_id = "xxxx-xxxxxxxx-xxxxxx"
subnet_id = "xxxx-xxxxxxxx-xxxxxx"
vpc_id = "xxxx-xxxxxxxx-xxxxxx"
backup_policy = [
{
backup_type = "auto"
save_days = 3
backup_at = [1]
begin_at = "00:00-01:00"
}
]
}
module "dcs" {
source = "tf-cloud-modules/dcs/sbercloud"
name = "dcs-test"
availability_zones = ["ru-moscow-1a"]
capacity = 1
engine = "Redis"
engine_version = "5.0"
flavor = "redis.ha.xu1.large.r2.1"
subnet_id = "xxxx-xxxxxxxx-xxxxxx"
vpc_id = "xxxx-xxxxxxxx-xxxxxx"
whitelists = [
{
group_name = "test"
ip_address = ["192.168.10.100", "192.168.0.0/24"]
}
]
}
Name | Version |
---|---|
terraform | >= 0.13.1 |
sbercloud | >= 1.9.0, < 2.0.0 |
Name | Version |
---|---|
sbercloud | 1.10.1 |
No modules.
Name | Type |
---|---|
sbercloud_dcs_instance.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
access_user | Specifies the username used for accessing a DCS Memcached instance. | string |
null |
no |
auto_renew | Specifies whether auto renew is enabled. | bool |
null |
no |
availability_zones | The code of the AZ where the cache node resides. | list(string) |
n/a | yes |
backup_policy | Specifies the backup configuration to be used with the instance. | list(any) |
[] |
no |
capacity | Specifies the cache capacity. | number |
n/a | yes |
charging_mode | Specifies the charging mode of the redis instance. | string |
null |
no |
create | Controls if resources should be created. | bool |
true |
no |
description | Specifies the description of an instance. | string |
null |
no |
engine | Specifies a cache engine. | string |
n/a | yes |
engine_version | Specifies the version of a cache engine. | string |
null |
no |
enterprise_project_id | The enterprise project id of the dcs instance. | string |
null |
no |
flavor | The flavor of the cache instance, which including the total memory, available memory, maximum number of connections allowed, maximum/assured bandwidth and reference performance. | string |
null |
no |
maintain_begin | Time at which the maintenance time window starts. | string |
null |
no |
maintain_end | Time at which the maintenance time window ends. | string |
null |
no |
name | Specifies the name of an instance. | string |
n/a | yes |
password | Specifies the password of a DCS instance. | string |
null |
no |
period | Specifies the charging period of the instance. | number |
null |
no |
period_unit | Specifies the charging period unit of the instance. | string |
null |
no |
port | Port customization, which is supported only by Redis 4.0 and Redis 5.0 instances. | string |
null |
no |
private_ip | The IP address of the DCS instance, which can only be the currently available IP address the selected subnet. | string |
null |
no |
region | Specifies the region in which to create the DCS instance resource. | string |
null |
no |
rename_commands | Critical command renaming, which is supported only by Redis 4.0 and Redis 5.0 instances but not by Redis 3.0 instance. | map(string) |
null |
no |
security_group_id | The ID of the security group which the instance belongs to. | string |
null |
no |
subnet_id | The ID of subnet which the instance belongs to. | string |
n/a | yes |
tags | The key/value pairs to associate with the dcs instance. | map(string) |
null |
no |
vpc_id | The ID of VPC which the instance belongs to. | string |
n/a | yes |
whitelist_enable | Enable or disable the IP address whitelists. | bool |
null |
no |
whitelists | Specifies the IP addresses which can access the instance. This parameter is valid for Redis 4.0 and 5.0 versions. | list(any) |
[] |
no |
Name | Description |
---|---|
capacity | Specifies the cache capacity. |
engine | Specifies a cache engine. |
engine_version | Specifies the version of a cache engine. |
enterprise_project_id | The enterprise project id of the dcs instance. |
flavor | The flavor of the cache instance, which including the total memory, available memory, maximum number of connections allowed, maximum/assured bandwidth and reference performance. |
id | Specifies a resource ID in UUID format. |
name | Specifies the name of an instance. |
password | Specifies the password of a DCS instance. |
port | Port used by an instance. |
private_ip | Private IP used by an instance. |
region | Specifies the region in which to create the DCS instance resource. |
security_group_id | The ID of the security group which the instance belongs to. |
subnet_id | The ID of subnet which the instance belongs to. |
vpc_id | The ID of VPC which the instance belongs to. |