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-2097 dns record active=false not working and the option comment does not exist #371

Open
yazbekhe opened this issue Dec 13, 2022 · 6 comments

Comments

@yazbekhe
Copy link

yazbekhe commented Dec 13, 2022

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 Version

Terraform v1.2.4

Affected Resource(s)

akamai_dns_record

Terraform Configuration Files

  zone       = local.dns_zone
  name       = local.certificate_hostname
  recordtype = "CNAME"
  active     = true
  ttl        = 600
  target     = ["xxxxxx"]
}

Debug Output

whatever the active is true or false the zone get activated in akamai. also the comment on the activation is the one of the previous activation and there is no option to set a new comment

Expected Behavior

to be able to activate the zone OR not to.
to be able to set a comment on the zone activation
it would be more logic that the activation get seperated from the creation of the records what will allow to create multiple records and activate once

@majakubiec
Copy link
Contributor

Hi
I am sorry for taking a long time to respond.

It looks like the active field is no longer supported in dns v2 api and I am not sure there is anything one can do about it:
https://github.com/akamai/AkamaiOPEN-edgegrid-golang/blob/master/pkg/dns/record.go#L54
I think the provider documentation will need to be fixed, since it suggests otherwise, and the active field get deprecated in akamai_dns_record resource. I'll create internal ticket to investigate it further.

Regarding adding comment, I think there is something we can do about it. I'll create internal ticket to address that.

@Slonimskaia Slonimskaia changed the title dns record active=false not working and the option comment does not exist DXE-2096 DXE-2097 dns record active=false not working and the option comment does not exist Jan 19, 2023
@chouraamine
Copy link

Hello,
Any update on this feature (Add a comment using terraform when creating a DNS record) please ?

@majakubiec
Copy link
Contributor

majakubiec commented Nov 14, 2023

Hi @chouraamine and @yazbekhe ,

I was just investigating this ticket and realized that I am not sure how you want this to work.

Add a comment using terraform when creating a DNS record

Do you mean the zone level comment being set by update on record resource? because I cannot do that since right now records in terraform are represented as a separately managed resources and having more that one record per zone would cause all of akamai_dns_record try to set the same zone level comment at every apply and it would create a huge mess.

Or maybe you want to be able to add a comment on per record basis that is visible in UI, so that every record has its own comment? Although this could be done in theory, it would require changes in api and in UI, before I could introduce this in terraform.

I wonder what is the problem that you are trying to solve. Maybe there is a different way to achieve the same thing. Please share with us, so we have better understanding of this problem.

@chouraamine
Copy link

Hello @majakubiec,
it is impossible to put comments to see changes.

Here is a screenshot :

capture DNS comment Akamai provider

We need to add an input variable where it is possible to put a comment.

Thanks

@majakubiec
Copy link
Contributor

@chouraamine This comments column can be set with zone's comment field in terraform:

resource "akamai_dns_zone" "test_zone" {
    zone = "example.com
    comment = "hello"                    <- this comment
    ...
}

But I guess this may not be the answer you were looking for.

Let me think...
When doing modifications with UI, all changes are added to the change list and you apply them all as one change where you can provide the comment that is later visible in history so one can quickly find the interesting change.
When updating records with terraform, every record change is listed in history as a separate change and right now previous comment is reused (implicitly, cannot be changed with api as far as I know).
Since it is not possible to stack changes in terraform I am guessing you want to have a comment field on akamai_dns_record resource so that the comment information is added to the change and visible in zone's history in UI? Is that correct?

@chouraamine
Copy link

@chouraamine This comments column can be set with zone's comment field in terraform:

resource "akamai_dns_zone" "test_zone" {
    zone = "example.com
    comment = "hello"                    <- this comment
    ...
}

But I guess this may not be the answer you were looking for.

Let me think... When doing modifications with UI, all changes are added to the change list and you apply them all as one change where you can provide the comment that is later visible in history so one can quickly find the interesting change. When updating records with terraform, every record change is listed in history as a separate change and right now previous comment is reused (implicitly, cannot be changed with api as far as I know). Since it is not possible to stack changes in terraform I am guessing you want to have a comment field on akamai_dns_record resource so that the comment information is added to the change and visible in zone's history in UI? Is that correct?

Yes that's right 👍

@aka-mark aka-mark removed the STG label Nov 16, 2023
@lkowalsk-akamai-com lkowalsk-akamai-com changed the title DXE-2096 DXE-2097 dns record active=false not working and the option comment does not exist DXE-2097 dns record active=false not working and the option comment does not exist Feb 5, 2024
@lkowalsk-akamai-com lkowalsk-akamai-com changed the title DXE-2097 dns record active=false not working and the option comment does not exist DXE-2097 dns record active=false not working and the option comment does not exist Feb 5, 2024
@aka-mark aka-mark added the edns label Jul 11, 2024
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