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

private_dns_cname_record TTL is set to be minimum 1 when it is possible to set TTL to 0 on the API #23917

Closed
1 task done
maonat opened this issue Nov 16, 2023 · 3 comments · Fixed by #23933
Closed
1 task done

Comments

@maonat
Copy link
Contributor

maonat commented Nov 16, 2023

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.5.3

AzureRM Provider Version

3.80.0

Affected Resource(s)/Data Source(s)

azurerm_private_dns_cname_record

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_private_dns_zone" "example" {
  name                = "mydomain.com"
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_private_dns_cname_record" "example" {
  name                = "test"
  zone_name           = azurerm_private_dns_zone.example.name
  resource_group_name = azurerm_resource_group.example.name
  ttl                 = 0
  record              = "contoso.com"
}

Debug Output/Panic Output

│ Error: expected ttl to be in the range (1 - 2147483647), got 0
│ 
│   with azurerm_private_dns_cname_record.example,
│   on main.tf line 43, in resource "azurerm_private_dns_cname_record" "example":
│   43:   ttl                 = 0
│

Expected Behaviour

TTL set to 0 for the record test.mydomain.com

Actual Behaviour

Error on apply

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@maonat
Copy link
Contributor Author

maonat commented Nov 16, 2023

Piece of code to fix from 1 to 0 on line 78:

"ttl": {
Type: pluginsdk.TypeInt,
Required: true,
ValidateFunc: validation.IntBetween(1, 2147483647),
},

@stephybun
Copy link
Member

Closed by #23918

Copy link

github-actions bot commented May 1, 2024

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 May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants