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

feat: add ds records and name servers resources for domains #818

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

App13Pie
Copy link

@App13Pie App13Pie commented Feb 2, 2025

Description

Added two resources for OVH domains:

  • ovh_domain_name_servers: Resource to set external name servers for a domain.
  • ovh_domain_ds_records: Resource to set ds_records for a domain

TODO: I haven't updated the documentation.

Fixes #146 (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I created a public zone on GPC Cloud DNS to have valid values to pass down to the below tests.

You'll have to export these environment variables:

export OVH_ZONE_TEST="..."
export OVH_DOMAIN_NS1_HOST_TEST="..."
export OVH_DOMAIN_NS1_IP_TEST="..."
export OVH_DOMAIN_NS2_HOST_TEST="..."
export OVH_DOMAIN_NS3_HOST_TEST="..."
export OVH_DOMAIN_DS_RECORD_ALGORITHM_TEST="..."
export OVH_DOMAIN_DS_RECORD_PUBLIC_KEY_TEST="..."
export OVH_DOMAIN_DS_RECORD_TAG_TEST="..."
  • Test A: make testacc TESTARGS="-run TestAccDomainNameServers_Basic"

Test Configuration:

  • Terraform version: terraform version: Terraform v1.10.5
  • Existing HCL configuration you used:
resource "ovh_domain_name_servers" "test" {
	domain = "test.ovh"

	servers {
		host = "ns-cloud-a1.googledomains.com"
		ip = "216.239.32.106"
	}

	servers {
		host = "ns-cloud-a2.googledomains.com"
		ip = ""
    }
}
  • Test B: make testacc TESTARGS="-run TestAccDomainDsRecords_Basic"

Test Configuration:

  • Terraform version: terraform version: Terraform v1.10.5
  • Existing HCL configuration you used:
resource "ovh_domain_ds_records" "test" {
	domain = "test.ovh"

	ds_records {
		algorithm = "RSASHA256"
		flags = "KEY_SIGNING_KEY"
		public_key = "YOUR_PUBLIC_KEY"
		tag = 12345
	}
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New resource: ovh_domain
1 participant