Acl Rule
Provides a Sag Acl Rule resource. This topic describes how to configure an access control list (ACL) rule for a target Smart Access Gateway instance to permit or deny access to or from specified IP addresses in the ACL rule. For information about Sag Acl Rule and how to use it, see What is access control list (ACL) rule.
NOTE: Available since v1.60.0. NOTE: Only the following regions support create Cloud Connect Network. `cn-shanghai`, `cn-shanghai-finance-1`, `cn-hongkong`, `ap-southeast-1`, `ap-southeast-2`, `ap-southeast-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rocketmq.Acl;
import com.pulumi.alicloud.rocketmq.AclRule;
import com.pulumi.alicloud.rocketmq.AclRuleArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf_example");
var defaultAcl = new Acl("defaultAcl");
var defaultAclRule = new AclRule("defaultAclRule", AclRuleArgs.builder()
.aclId(defaultAcl.id())
.description(name)
.policy("accept")
.ipProtocol("ALL")
.direction("in")
.sourceCidr("10.10.1.0/24")
.sourcePortRange("-1/-1")
.destCidr("192.168.1.0/24")
.destPortRange("-1/-1")
.priority("1")
.build());
}
}
Content copied to clipboard
Import
The Sag Acl Rule can be imported using the id, e.g.
$ pulumi import alicloud:rocketmq/aclRule:AclRule example acr-abc123456
Content copied to clipboard