Created
May 20, 2022 17:29
-
-
Save WhatsARanjit/050642e4d66ee4442fcd426a2b7d4cd1 to your computer and use it in GitHub Desktop.
Datasource for TFC IP ranges
This file contains 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
$ terraform apply -auto-approve | |
Apply complete! Resources: 0 added, 0 changed, 0 destroyed. | |
Outputs: | |
api = [ | |
"75.2.98.97/32", | |
"99.83.150.238/32", | |
] | |
notifications = [ | |
"52.86.200.106/32", | |
"52.86.201.227/32", | |
"52.70.186.109/32", | |
"44.236.246.186/32", | |
"54.185.161.84/32", | |
"44.238.78.236/32", | |
] | |
sentinel = [ | |
"52.86.200.106/32", | |
"52.86.201.227/32", | |
"52.70.186.109/32", | |
"44.236.246.186/32", | |
"54.185.161.84/32", | |
"44.238.78.236/32", | |
] | |
vcs = [ | |
"52.86.200.106/32", | |
"52.86.201.227/32", | |
"52.70.186.109/32", | |
"44.236.246.186/32", | |
"54.185.161.84/32", | |
"44.238.78.236/32", | |
] |
This file contains 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
variable "tf_server" { | |
default = "app.terraform.io" | |
} | |
data "http" "ip_ranges" { | |
url = "https://${var.tf_server}/api/meta/ip-ranges" | |
} | |
output "api" { | |
value = jsondecode(data.http.ip_ranges.body)["api"] | |
} | |
output "notifications" { | |
value = jsondecode(data.http.ip_ranges.body)["notifications"] | |
} | |
output "sentinel" { | |
value = jsondecode(data.http.ip_ranges.body)["sentinel"] | |
} | |
output "vcs" { | |
value = jsondecode(data.http.ip_ranges.body)["vcs"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment