-
Notifications
You must be signed in to change notification settings - Fork 135
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
feat: Add resource ovh_domain_name #837
base: master
Are you sure you want to change the base?
Conversation
order := data.ToOrder() | ||
setDefaultDomainOrderValues(ctx, order, data.DomainName.ValueString()) | ||
if err := orderCreate(order, r.config, "domain", true); err != nil { | ||
resp.Diagnostics.AddError("failed to create order", err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we return here?
|
||
serviceName := data.DomainName.ValueString() | ||
|
||
serviceID, err := serviceIdFromResourceName(r.config.OVHClient, serviceName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/services service name are not unique, meaning that domain name will have the same service name than the web hosting attached to the domain name, or the dns zone
As here
terraform-provider-ovh/ovh/services.go
Line 57 in 257f28b
return serviceIds[0], nil |
We need to make serviceIdFromResourceName
evolve to handle "serviceType"
|
||
```hcl | ||
resource "ovh_domain_name" "domain" { | ||
domain_name = "a-great-domain.ovh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain_name = "a-great-domain.ovh" | |
domain_name = "example.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had previous case in Golang code base where they use funny domain name for their tests, and the domain was not registered. Then this domain started to display undesirable content.
Let's stick to example.com here, which is a protected domain for documentation and RFC
Description
Add resource
ovh_domain_name
.Type of change
How Has This Been Tested?
make testacc TESTARGS="-run TestAccResourceDomainName_basic"
Checklist:
go mod vendor
if I added or modifygo.mod
file