Skip to content

Amend new attributes in network_profile block#585

Merged
lonegunmanb merged 4 commits intomainfrom
network_profile
Mar 21, 2025
Merged

Amend new attributes in network_profile block#585
lonegunmanb merged 4 commits intomainfrom
network_profile

Conversation

@lonegunmanb
Copy link
Copy Markdown
Member

Describe your changes

This pr amended missing new attributes in network_profile nested block.

It doesn't support outbound_ip_prefix_ids and outbound_ip_address_ids since they're about to be deprecated in AzureRM provider v4.

Issue number

#518

Checklist before requesting a review

  • The pr title can be used to describe what this pr did in CHANGELOG.md file
  • I have executed pre-commit on my machine
  • I have passed pr-check on my machine

Thanks for your cooperation!

Comment thread main.tf Outdated
Comment thread main.tf Outdated
pod_cidr = var.net_profile_pod_cidr
pod_cidrs = var.network_pod_cidrs
service_cidr = var.net_profile_service_cidr
service_cidrs = var.network_service_cidrs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, it would be either service_cidr or service_cidrs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified that we could set both service_cidr and service_cidrs @zioproto , here's my tfstate snippet:

"pod_cidr": "10.244.0.0/16",
                "pod_cidrs": [
                  "10.244.0.0/16",
                  "fded:4c8d:9691:939b::/64"
                ],
                "service_cidr": "10.0.0.0/16",
                "service_cidrs": [
                  "10.0.0.0/16",
                  "fd01:db8:deca::/108"
                ]

Comment thread variables.tf
description = "(Optional) Specifies the data plane used for building the Kubernetes network. Possible values are `azure` and `cilium`. Defaults to `azure`. Disabling this forces a new resource to be created."
}

variable "network_ip_versions" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a precondition that network_plugin_mode is set to overlay

Comment thread variables.tf Outdated
default = null
description = <<-EOT
`nat_gateway_profile` block supports the following:
- `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing a review of this PR I found out that the upstream provider documentation was wrong. Also for the parameters.

I opened a PR here:
https://github.com/hashicorp/terraform-provider-azurerm/pull/27287/files

Comment thread variables.tf Outdated
default = null
description = <<-EOT
`nat_gateway_profile` block supports the following:
- `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`.
- `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the managed nat gateway. Must be between `4` and `120` inclusive. Defaults to `4`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lonegunmanb please review suggestion

Comment thread variables.tf Outdated
description = <<-EOT
`nat_gateway_profile` block supports the following:
- `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`.
- `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive.
- `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the managed nat gateway. Must be between `1` and `16` inclusive.

@lonegunmanb lonegunmanb merged commit c86b2a1 into main Mar 21, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Azure Module Kanban Mar 21, 2025
@lonegunmanb lonegunmanb deleted the network_profile branch March 21, 2025 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants