-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ip_configuration block to private endpoints #1691
Add ip_configuration block to private endpoints #1691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR @fschirinzi, are you able to add an self-contained example so we can run your code/examples in CI/CD?
thanks
Arnaud
@arnaudlh Hi Arnaud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @fschirinzi,
I can see there that could be multiple ip_configuration
blocks as per https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint#ip_configuration.
I think config file should be like that:
ip_configurations = {
static1= {
name = "kv01_rg1-name"
private_ip_address = "10.150.100.140"
subresource_name = "vault"
member_name = "default"
}
static2 = {
name = "kv02_rg1-name"
private_ip_address = "10.150.100.150"
}
}
and the code like:
dynamic "ip_configuration" {
for_each = try(var.settings.ip_configurations, {})
...
Try and let me know if ok with it?
You are right. The I'll work on it. |
Co-authored-by: Arnaud Lheureux <[email protected]>
@arnaudlh Should work now. Can you test please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You can test this module outside of a landingzone using | ||
|
||
```bash | ||
sudo terraform init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo terraform init | |
terraform init |
|
||
``` | ||
|
||
sudo terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars | |
terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars |
|
||
``` | ||
|
||
sudo terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars | |
terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars |
@@ -0,0 +1,19 @@ | |||
You can test this module outside of a landingzone using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can test this module outside of a landingzone using | |
You can test this module outside of a rover using |
Issue-1689
PR Checklist
Description
Currently, it is not possible to define a static IP-address for private endpoints by defining the
ip_configuration
block, which is supported in the Private-Endpoint Terraform Resource >3.21.0.This PR enables reading the
ip_configuration
from the settings property.Does this introduce a breaking change
Testing