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

Domain A record is added, not updated #292

Closed
technicalflow opened this issue Aug 21, 2022 · 5 comments
Closed

Domain A record is added, not updated #292

technicalflow opened this issue Aug 21, 2022 · 5 comments

Comments

@technicalflow
Copy link

technicalflow commented Aug 21, 2022

Hello there,

Using ovh_domain_zone_record terraform is adding second A record instead of changing current one.

My configuration for Azure:

resource "ovh_domain_zone_record" "testip" {
zone = var.domain_name
subdomain = null
fieldtype = "A"
ttl = "0"
target = data.azurerm_public_ip.pipread.ip_address

depends_on = [
azurerm_public_ip.pip
]
}

@gregory-lecomte
Copy link

Hi,

I have the same Issue, it's work when I edit the record on UI and just save it without any change.

I read the api documentation, and this resources looks missing the refresh action :

/domain/zone/{zoneName}/refresh

@gregory-lecomte
Copy link

Hi,

Following my work to do a workaround with curl command, I realized that my token didn't have rights to refresh...

So the problem is maybe in the response which doesn't say anything about that ?

I did a new test with these rights, and now the DNS looks good.

I'll continue to perform some test to confirm that it's ok

@gregory-lecomte
Copy link

gregory-lecomte commented Nov 2, 2022

Hi,

Following many tests on 2 lasts weeks, all work fine.

Just for your information, the following rights are needed to work as expected :

GET : /domain/zone/example.com/record/*
PUT: /domain/zone/example.com/record/*
DELETE: /domain/zone/example.com/record/*
GET: /domain/zone/example.com/record
POST: /domain/zone/example.com/record
POST: /domain/zone/example.com/refresh

example.com must be replaced by your own domain

@yomovh
Copy link
Contributor

yomovh commented Dec 19, 2022

@technicalflow : if terraform has not created the record but you need to update it then you need to import the record as stated in the documentation
I have proposed a PR in order to be clearer on how to get the zone record id

@yomovh
Copy link
Contributor

yomovh commented Jan 20, 2023

Closing the issue since the documentation have been updated in 0.26

@yomovh yomovh closed this as completed Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants