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

google_dns_managed_zone: description cannot be empty string #12868

Closed
smaftoul opened this issue Oct 25, 2022 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#6753, hashicorp/terraform-provider-google-beta#4837 or #12948
Assignees
Labels

Comments

@smaftoul
Copy link

smaftoul commented Oct 25, 2022

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.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

$ terraform -v
Terraform v1.3.3
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v4.41.0

Affected Resource(s)

  • google_dns_managed_zone

Terraform Configuration Files

resource "google_dns_managed_zone" "mynet" {
  project     = var.project
  name        = "mynet-lan"
  dns_name    = "mynet.lan."
  description = ""
}

Expected Behavior

The google_dns_managed_zone gets created or, we have an error on the plan.

Actual Behavior

google_dns_managed_zone.mynet: Creating...
╷
│ Error: Error creating ManagedZone: googleapi: Error 400: The 'entity.managedZone.description' parameter is required but was missing., required
│ 
│   with google_dns_managed_zone.mynet,
│   on main.tf line 1, in resource "google_dns_managed_zone" "mynet":
│    1: resource "google_dns_managed_zone" "mynet" {

Steps to Reproduce

  1. terraform apply

Important Factoids

  • Doesn't work with "" as description, works with a description or without the description argument.
  • Works without a description or, with a not empty string description.
  • The description argument is documented as optional in the terraform provider.
  • I haven't been able to find in google API documentation whether this field is optional, but the API behaves like if it's required.

References

@smaftoul smaftoul added the bug label Oct 25, 2022
@smaftoul smaftoul changed the title google_dns_managed_zone description argument seems required google_dns_managed_zone description cannot be empty string Oct 25, 2022
@smaftoul smaftoul changed the title google_dns_managed_zone description cannot be empty string google_dns_managed_zone: description cannot be empty string Oct 25, 2022
@edwardmedia edwardmedia self-assigned this Oct 25, 2022
@edwardmedia
Copy link
Contributor

@smaftoul clearly this field is required by the api. if you omit it in the config, the provider set the default Managed by Terraform for you. But if you sent it an empty string "", the api rejects. I think this is by design. Does this make sense?

Error 400: The 'entity.managedZone.description' parameter is required but was missing., required

@smaftoul
Copy link
Author

smaftoul commented Oct 28, 2022

I would have think that the provider must take care of validating inputs. I want to see things failing during the plan rather than the apply.

@github-actions
Copy link

github-actions bot commented Dec 5, 2022

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 Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.