question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating a DNS managedZone returns "INVALID_ARGUMENT"

See original GitHub issue

Hi,

I am trying to create a managed DNS zone following the example here and I get the following error in Deployment Manager:

ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1588969909552-5a528e3048557-8403a662-67474853]: errors:
- code: RESOURCE_ERROR
  location: /deployments/dev-server/resources/YOUR_DEPLOYMENT_NAME
  message: '{"ResourceType":"dns.v1.managedZone","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"Request
    contains an invalid argument.","status":"INVALID_ARGUMENT","statusMessage":"Bad
    Request","requestPath":"https://dns.googleapis.com/dns/v1/projects/mygcpproject/managedZones","httpMethod":"POST"}}'

Code:

resources:
- name: YOUR_DEPLOYMENT_NAME
  type: gcp-types/dns-v1:managedZones
  properties:
    description: A managed zone
# Making dnsName unique with deployment name for testing purpose.
    dnsName: my-great-domain-YOUR_DEPLOYMENT_NAME.com.

I also tried with type: dns.v1.managedZone as well as type: gcp-types/dns-v1beta2:managedZones. I get the same exact same error regardless of the properties that I add.

I can create the managed zone via the Console, gcloud command as well as pinging the REST API manually.

It’s unclear why my Deployment Manager request is invalid, and what the INVALID_ARGUMENT is.

Any ideas?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
komasoftwarecommented, May 30, 2020

Turns out that ‘description’ is a required field. @jimanvlad that makes the call work.

… sigh

0reactions
ocsigcommented, Jun 1, 2020

@komasoftware Please take a look at the 'type': 'gcp-types/dns-v1:resourceRecordSets' type. This was published at the end of 2018, after your thread. Official DM type examples CFT DNS record examples

I believe this solved the recordset update problem you had. Let me know if you have any feedback on this type as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error messages | Cloud DNS
The operation to create a managed zone can fail with this error for the following reasons: The DNS name of the proposed zone...
Read more >
Google Cloud DNS Bad Request Reason Invalid
You forgot a period at the end of your dns name. It should be: gcloud dns managed-zone create \ --dns_name="archiver.photo.
Read more >
Troubleshooting Domain Controller Deployment
Warning returned twice when promoting using ADDSDeployment Windows PowerShell: Code - "A delegation for this DNS server cannot be created ...
Read more >
Source code for google.cloud.dns.zone
See: https://cloud.google.com/dns/api/v1/managedZones :type name: string ... :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the creation time ...
Read more >
google_dns_managed_zone | Resources | hashicorp/google
A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service. ... Example Usage - Dns Managed Zone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found