- 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 "secgroup" {
source = "tf-cloud-modules/networking-secgroup/sbercloud"
name = "sg-test"
ingress_rules = [
{
description = "All ingress traffic from a specified CIDR"
remote_ip_prefix = "10.15.0.0/16"
},
{
port_range_min = 8080
port_range_max = 8090
protocol = "udp"
description = "User-service ports"
remote_ip_prefix = "10.10.0.0/16"
},
{
port_range_min = 8888
port_range_max = 8888
protocol = "tcp"
description = "Traffic from certain sec group"
remote_group_id = "xxxx-xxx-xxx"
}
]
egress_rules = [
{
description = "Traffic to the Internet"
remote_ip_prefix = "0.0.0.0/0"
}
]
}
Name | Version |
---|---|
terraform | >= 0.13.1 |
sbercloud | >= 1.9.0, < 2.0.0 |
Name | Version |
---|---|
sbercloud | 1.11.3 |
No modules.
Name | Type |
---|---|
sbercloud_networking_secgroup.this | resource |
sbercloud_networking_secgroup_rule.egress_rules | resource |
sbercloud_networking_secgroup_rule.ingress_rules | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
create | Controls if resources should be created. | bool |
true |
no |
create_sg | Controls if security group should be created. | bool |
true |
no |
delete_default_rules | Controls if default rules should be deleted. | bool |
true |
no |
description | Specifies supplementary information about the security group. The value is a string of no more than 255 characters and cannot contain angle brackets. | string |
null |
no |
egress_rules | List of egress rules to create. | list(map(string)) |
[] |
no |
enterprise_project_id | Specifies the enterprise project id of the security group. Changing this creates a new security group. | string |
null |
no |
ingress_rules | List of ingress rules to create. | list(map(string)) |
[] |
no |
name | Specifies the name of the security group. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-). | string |
n/a | yes |
region | Specifies the region in which to create the security group. If omitted, the provider-level region will be used. Changing this creates a new security group. | string |
null |
no |
security_group_id | ID of existing security group to manage. | string |
null |
no |
No outputs.