官术网_书友最值得收藏!

How it works...

Here we have used variables registered from previous tasks to pass the VPC ID as an input (vpc_id). This task creates a security group with the name my_first_sg. The parameter rules is used for defining all ingress policies and similarly rules_egress for outbound policies. Every block inside ingress rules requires four key bits of information; that is, the protocol (TCP, UDP, or ICMP), the start of the port range (from_port), the end of the port range (to_port), and the CIDR to the whitelist. In all other protocols (except ICMP) we define the port range. But if we choose protocol as ICMP we have to define ICMP code. For example, 8 is used for ICMP echo requests and -1 is a wildcard (that is, any ICMP type number). We have allowed port 80 and port 443 from anywhere; that is 0.0.0.0/0. But port 22 (which is a default port for SSH connections) and all ICMP requests are accessible within the CIDR address space of our VPC. 

We have registered the security group as my_first_sg. We will be using this as a variable in upcoming tasks.
主站蜘蛛池模板: 遂川县| 永康市| 望都县| 诸暨市| 额尔古纳市| 泾阳县| 潢川县| 乌兰察布市| 长海县| 藁城市| 乐业县| 河西区| 南充市| 泗阳县| 松潘县| 松溪县| 宣汉县| 临漳县| 邓州市| 宜都市| 延川县| 乌拉特后旗| 龙泉市| 罗平县| 阳城县| 珠海市| 沁阳市| 新安县| 疏附县| 方山县| 苏尼特左旗| 常山县| 巴彦淖尔市| 海安县| 松潘县| 大竹县| 新泰市| 通化县| 盐池县| 玛曲县| 那曲县|