https://github.com/jameswoolfenden/terraform-http-ip
A very simple module to return the host Public IP address
https://github.com/jameswoolfenden/terraform-http-ip
http ip module terraform
Last synced: 6 months ago
JSON representation
A very simple module to return the host Public IP address
- Host: GitHub
- URL: https://github.com/jameswoolfenden/terraform-http-ip
- Owner: JamesWoolfenden
- License: gpl-3.0
- Created: 2019-04-01T22:30:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-01T08:28:10.000Z (over 2 years ago)
- Last Synced: 2025-04-19T10:08:37.009Z (10 months ago)
- Topics: http, ip, module, terraform
- Language: Makefile
- Homepage:
- Size: 93.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-http-ip
[](https://github.com/JamesWoolfenden/terraform-http-ip)
[](https://github.com/JamesWoolfenden/terraform-http-ip/releases/latest)
[](https://github.com/JamesWoolfenden/terraform--http-ip/releases/latest)

[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-http-ip&benchmark=CIS+AWS+V1.2)
[](https://github.com/pre-commit/pre-commit)
[](https://www.checkov.io/)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-http-ip&benchmark=INFRASTRUCTURE+SECURITY)
This `terraform-http-ip` is designed to return the public IP of the box running terraform, it's designed for use in a security group.
---
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
## Usage
Expecting minimal usage.
```terraform
module "data" {
source = "jameswoolfenden/ip/http"
version= "0.3.2"
}
```
It has an output of ip so in your code e.g.
```tf
master_authorized_networks_config {
cidr_blocks {
cidr_block = "${module.data.ip}/32"
}
}
```
or as a CIDR
```tf
master_authorized_networks_config {
cidr_blocks {
cidr_block = module.data.cidr
}
}
```
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [http](#provider\_http) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [http_http.ip](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |
## Inputs
No inputs.
## Outputs
| Name | Description |
|------|-------------|
| [cidr](#output\_cidr) | Outputs your IP address as a CIDR |
| [ip](#output\_ip) | Your IP |
## Help
**Got a question?**
File a GitHub [issue](https://github.com/JamesWoolfenden/terraform-http-ip/issues).
## Contributing
### Bug Reports & Feature Requests
Please use the [issue tracker](https://github.com/JamesWoolfenden/terraform-http-ip/issues) to report any bugs or file feature requests.
## Copyrights
Copyright © 2019-2023 James Woolfenden
## License
[](https://opensource.org/licenses/Apache-2.0)
See [LICENSE](LICENSE) for full details.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
### Contributors
[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]
[James Woolfenden][jameswoolfenden_homepage]
[jameswoolfenden_homepage]: https://github.com/jameswoolfenden
[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150