Last active
October 5, 2017 11:37
-
-
Save mapk0y/2663e5dfc5678d878a2de938eff313c3 to your computer and use it in GitHub Desktop.
Terraform for さくらのクラウド のパケットフィルタ設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource sakuracloud_server "sv" { | |
count = 2 # <== 2台立ててる | |
name = "sv${format("%02d", count.index)}" | |
} | |
resource sakuracloud_packet_filter "pf" { | |
name = "pf" | |
expressions = { | |
protocol = "ip" | |
source_nw = "${sakuracloud_server.sv.*.ipaddress}" # <== ここをうまくする方法 | |
} | |
expressions = { | |
protocol = "udp" | |
source_port = "123" | |
} | |
} | |
resource sakuracloud_server_connector "connector" { | |
server_id = "${sakuracloud_server.sv.id}" | |
packet_filter_ids = ["${sakuracloud_packet_filter.pf.id}"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aws provider の場合の aws_security_group と aws_security_group_rule の関係となるようなものがあれば良いのだろうか