SecurityGroup

class SecurityGroup : KotlinCustomResource

Provides a security group resource.

NOTE: alicloud.ecs.SecurityGroup is used to build and manage a security group, and alicloud.ecs.SecurityGroupRule can define ingress or egress rules for it. NOTE: From version 1.7.2, alicloud.ecs.SecurityGroup has supported to segregate different ECS instance in which the same security group.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new SecurityGroup("default", SecurityGroupArgs.builder()
.description("New security group")
.build());
}
}

Module Support

You can use the existing security-group module to create a security group and add several rules one-click.

Import

Security Group can be imported using the id, e.g.

$ pulumi import alicloud:ecs/securityGroup:SecurityGroup example sg-abc123456

Properties

Link copied to clipboard
val description: Output<String>?

The security group description. Defaults to null.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val innerAccess: Output<Boolean>

Field 'inner_access' has been deprecated from provider version 1.55.3. Use 'inner_access_policy' replaces it.

Link copied to clipboard

Whether to allow both machines to access each other on all ports in the same security group. Valid values: "Accept", "Drop"

Link copied to clipboard
val name: Output<String>

The name of the security group. Defaults to null.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>?

The Id of resource group which the security_group belongs.

Link copied to clipboard

The type of the security group. Valid values: normal: basic security group. enterprise: advanced security group For more information.

Link copied to clipboard
val tags: Output<Map<String, Any>>?

A mapping of tags to assign to the resource. Combining security group rules, the policy can define multiple application scenario. Default to true. It is valid from version 1.7.2.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>?

The VPC ID.