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

DXE-3816 An invalid IPv6 Address in akamai_dns_record resource triggers a stacktrace instead of a validation error #550

Open
dandrucz opened this issue May 1, 2024 · 3 comments

Comments

@dandrucz
Copy link

dandrucz commented May 1, 2024

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform and Akamai Terraform Provider Versions

Run terraform -v in the directory with the .tf files to show the terraform and akamai provider versions. If you are not running the latest versions of Terraform and Akamai Terraform Provider, please upgrade because your issue may have already been fixed.

Affected Resource(s)

Please list the resources as a list, for example:

  • akama_dns_record

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

Terraform v1.5.7
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.8.2. You can update by downloading from https://www.terraform.io/downloads.html
+ provider registry.terraform.io/akamai/akamai v6.0.0

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
https://gist.github.com/dandrucz/a42afdb6a9d48d12504abcb33d1a30a4

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

When fed with an incorrect IPV6 address, the code should spit out an error message that a bad IPV6 record was provided

Actual Behavior

Stacktrace and crash

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:
create file test.ft with
data "akamai_group" "mygroup" {
group_name = "mygroup"
contract_id = data.akamai_contract.default.id
}
resource "akamai_dns_zone" "myzone" {
contract = data.akamai_contract.default.id
group = data.akamai_group.mygroup.id
zone = "test.example.com"
type = "primary"
comment = Test DNS zone - Terraform Managed"
sign_and_serve = false
lifecycle {
prevent_destroy = true
}
}

resource "akamai_dns_record" "metadata_host_special_ipv6_AAAA" {
zone = akamai_dns_zone.myzone[0].zone
name = "test.${akamai_dns_zone.myzone[0].zone}."
recordtype = "AAAA"
active = true
ttl = 1800
target = "1111:2222:3333:4444:55555:6666:7777:8888"
}

Attempt to terraform apply it, you'll get a stacktrace. instead of something more sensible like " "1111:2222:3333:4444:55555:6666:7777:8888" is not a valid IPv6 record, please check your syntax
^^^^^^^

@PawelSnoch
Copy link

Hello @dandrucz ,

thank you for opening this ticket.
You provide an incorrect type of attribute target. It should be list of strings. Could you verify that?

Best regards,
Pawel

@dandrucz
Copy link
Author

dandrucz commented May 2, 2024 via email

@ckulinsk ckulinsk changed the title An invalid IPv6 Address in akamai_dns_record resource triggers a stacktrace instead of a validation error DXE-3816 An invalid IPv6 Address in akamai_dns_record resource triggers a stacktrace instead of a validation error May 9, 2024
@ckulinsk ckulinsk added the bug label May 9, 2024
@ckulinsk
Copy link

ckulinsk commented May 9, 2024

Hi @dandrucz ,

Thanks for reporting this issue. We were able to reproduce it and will inform you about the progress of fix.

Best Regards,
Cyryl

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

No branches or pull requests

4 participants