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

Error on google_dns_record_set but ressource is created #9016

Closed
tyki6 opened this issue Apr 28, 2021 · 2 comments
Closed

Error on google_dns_record_set but ressource is created #9016

tyki6 opened this issue Apr 28, 2021 · 2 comments
Assignees
Labels
bug forward/review In review; remove label to forward service/cloud-dns

Comments

@tyki6
Copy link

tyki6 commented Apr 28, 2021

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 v0.14.10
+ provider registry.terraform.io/hashicorp/google v3.64.0
+ provider registry.terraform.io/hashicorp/helm v2.1.1
+ provider registry.terraform.io/hashicorp/kubernetes v1.13.3
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/hashicorp/vault v2.19.0

Your version of Terraform is out of date! The latest version
is 0.15.1. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • google_dns_record_set

Terraform Configuration Files

provider "google" {
  alias = "lh"
  project = "project_id"
}

data "google_dns_managed_zone" "prod_public" {
  provider = google.lh
  name = "myzone"
}


resource "google_dns_record_set" "jenkins_hostname" {
  provider = google.lh
  name = "jenkins.${data.google_dns_managed_zone.prod_public.dns_name}"
  type = "A"
  ttl  = 300

  managed_zone = data.google_dns_managed_zone.prod_public.name

  rrdatas = [google_compute_global_address.jenkins_ip.address]
}

Expected Behavior

No Error and my record set is present on my gcp console.

# google_dns_record_set.jenkins_hostname will be created
  + resource "google_dns_record_set" "jenkins_hostname" {
      + id           = (known after apply)
      + managed_zone = "my-zone"
      + name         = "jenkins.xxxxx."
      + project      = (known after apply)
      + rrdatas      = [
          + "35.xxx.xxx.xx",
        ]
      + ttl          = 300
      + type         = "A"
    }

Actual Behavior

Error: Error when reading or editing DNSResourceDnsRecordSet "projects/my-project/managedZones/myzone/rrsets/jenkins.xxxxxxx./A": googleapi: Error 403: Forbidden, forbidden

  on dns.tf line 12, in resource "google_dns_record_set" "jenkins_hostname":
  12: resource "google_dns_record_set" "jenkins_hostname" {

But when i check on my gcp console my record set is present.

RecordSet List:

gcloud dns record-sets list --zone=my-zone --project=my-project
jenkins.xxxxxxx.  A     300    35.xxx.xxx.xx

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@tyki6 tyki6 added the bug label Apr 28, 2021
@edwardmedia edwardmedia self-assigned this Apr 28, 2021
@edwardmedia
Copy link
Contributor

@mbouamama closing this as it is a dup #8935
Below PR has been opened. Hopefully this can be resolved.

GoogleCloudPlatform/magic-modules#4725

@ghost
Copy link

ghost commented May 28, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2021
@github-actions github-actions bot added forward/review In review; remove label to forward service/cloud-dns labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug forward/review In review; remove label to forward service/cloud-dns
Projects
None yet
Development

No branches or pull requests

2 participants