Skip to content

Terraform provider to verify whether a given IP Address is located in a subnet or list of subnets

Notifications You must be signed in to change notification settings

mgnisia/terraform-provider-subnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Provider subnet

Run the following command to build the provider

go build -o terraform-provider-subnet

Examples

data "subnet_single" "test" {
  cidr = "10.69.32.0/20"
  ip   = "10.69.36.88"
}

with data.subnet_single_test.included you get a boolean which tells you whether the given IP is included in the given subnet

data "subnet_list" "test" {
  cidr_list = ["10.69.32.0/20", "10.75.32.0/20"]
  ip        = "10.69.36.88"
}
  • with data.subnet_list.included you get a boolean which tells you whether the given IP is included in the given subnet
  • with data.subnet_list.included_subnet_index you get the index (int) which of the given subnets in the cidr_list includes the given IP
  • with data.subnet_list.included_subnet_cidr you get the cidr (string) which of the given subnets in the cidr_list includes the given IP

About

Terraform provider to verify whether a given IP Address is located in a subnet or list of subnets

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •