terraform-provider-ipify

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

terraform-provider-ipify

Terraform provider for Ipify to use your public IP in Terraform configurations.

Release

Install

Binary

Download the latest binary for your platform from the Releases page

unzip terraform-provider-ipify_v0.0.1_darwin_amd64.zip && rm terraform-provider-ipify_v0.0.1_darwin_amd64.zip
mv ./terraform-provider-ipify ~/.terraform.d/plugins/
From Source
git clone git@github.com:rmorris1218/terraform-provider-ipify
cd terraform-provider-ipify
mkdir -p ~/.terraform.d/plugins
go build -o ~/.terraform.d/plugins/terraform-provider-ipify

TODO: releases

Using the Provider

Once the provider is installed on your system, you can use it in your Terraform configurations.

provider "ipify" {}

data "ipify_current_ip" "runner_ip" {}

# print public IP to Terraform run outputs
output "current_ip" {
    value = data.ipify_current_ip.runner_ip.address
}

# use public IP CIDR notation for an AWS Security Group ingress rule
resource "aws_security_group" "jumphost" {
  # ...

  ingress {
    description = "ingress from workstation public ip"
    from_port   = 22
    to_port     = 22
    protocol    = "tcp"
    cidr_blocks = [ data.ipify_current_ip.runner_ip.address_cidr ]
  }
  # ...
}

Inputs

None.

Outputs

field type description
address string public IP address from where terraform is running
address_cidr string the address field appended with single host CIDR notation

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址