Skip to content
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

Allow null value for "sa_data_size_kb" in resource azurerm_vpn_gateway_connection #24823

Closed
1 task done
tovstcn opened this issue Feb 8, 2024 · 2 comments · Fixed by #24880
Closed
1 task done

Allow null value for "sa_data_size_kb" in resource azurerm_vpn_gateway_connection #24823

tovstcn opened this issue Feb 8, 2024 · 2 comments · Fixed by #24880

Comments

@tovstcn
Copy link

tovstcn commented Feb 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.7.2

AzureRM Provider Version

3.90.0

Affected Resource(s)/Data Source(s)

azurerm_vpn_gateway_connection

Terraform Configuration Files

resource "azurerm_vpn_gateway_connection" "connection" {

### unrelated code

  vpn_link {
    name                 = "Link"
    egress_nat_rule_ids  = []
    ingress_nat_rule_ids = []
    vpn_site_link_id     = azurerm_vpn_site.site.link[0].id
    shared_key           = data.azurerm_key_vault_secret.presharedkey.value

    ipsec_policy {
      dh_group                 = "DHGroup14"
      encryption_algorithm     = "AES256"
      ike_encryption_algorithm = "AES256"
      ike_integrity_algorithm  = "SHA256"
      integrity_algorithm      = "SHA256"
      pfs_group                = "PFS14"
      sa_data_size_kb          = "0"
      sa_lifetime_sec          = "43200"
    }
  }
}

Debug Output/Panic Output

expected vpn_link.0.ipsec_policy.0.sa_data_size_kb to be in the range (1024 - 2147483647), got 0

Expected Behaviour

succesful plan / apply with sa_data_size_kb "0" or null, since azure allows empty value for this argument when configuring it through the portal.

Actual Behaviour

Error: expected vpn_link.0.ipsec_policy.0.sa_data_size_kb to be in the range (1024 - 2147483647), got 0

Steps to Reproduce

  1. Terraform apply the resource without ipsec policy configuration block
  2. Configure ipsec policy configuration manually through azure portal without providing a value for payload size in KB
  3. wait for vpn connection to succeed
  4. Run terraform plan
  5. Notice that terraform mentions sa_data_size_kb is actually set to 0
  6. Add ipsec policy config as such:
    ipsec_policy {
      dh_group                 = "DHGroup14"
      encryption_algorithm     = "AES256"
      ike_encryption_algorithm = "AES256"
      ike_integrity_algorithm  = "SHA256"
      integrity_algorithm      = "SHA256"
      pfs_group                = "PFS14"
      sa_data_size_kb          = 0
      sa_lifetime_sec          = 43200
    }
  1. Apply config

Important Factoids

No response

References

No response

@mikemadeja
Copy link
Contributor

@tovstcn, I created a PR to allow 0. We'll see if it gets approved.

@github-actions github-actions bot added this to the v3.92.0 milestone Feb 15, 2024
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants