Slide 48
Slide 48 text
RubyͳΒͭΒ͘ͳ͍ (2)
• Ϧετඌཁૉͷޙʹ,Λ͚ͭΒΕΔʂ
roles = [
“web”,
“app”,
“db”,
]
!
roles.each do |role|
_ "#{role.capitalize}SecurityGroup" do
Type "AWS::EC2::SecurityGroup"
Properties do
GroupDescription "Security group for #{role} instances."
VpcId {Ref "#{ENVIRONMENT}VPC"}
Tags [
"Key" => "Name",
"Value" => role,
]
end
end
end