hallowed-agent-41624
04/26/2024, 8:18 PMfunc (c *Civo) WithDnsDomainNameRecord(ctx *pulumi.Context, ip string, prefix pulumi.StringOutput) error {
_, err := civo.NewDnsDomainRecord(ctx, ip, &civo.DnsDomainRecordArgs{
Ttl: pulumi.Int(600),
Type: pulumi.String("A"),
DomainId: c.DomainName.ID(),
Name: prefix,
Value: pulumi.String(ip),
},
pulumi.Parent(c),
)
if err != nil {
return err
}
return nil
}
The following error occurs:
> Diagnostics:
> civoindexDnsDomainRecord (74.220.31.244):
> error: 1 error occurred:
> * updating urnpulumistg:bringalongbringalonginfra:civo$civoindex/dnsDomainRecordDnsDomainRecord:74.220.31.244 1 error occurred:
> * [ERR] an error occurred while renamed the domain record bc2db7f1-9fc7-4ad1-a907-d122688a1800, ParameterDnsRecordTypeError: The type of the DNS record was invalid - only 'A', 'MX', 'CNAME' or 'TXT' are supported
Is this an error on my end and I did something wrong or is there nothing I can improve?
Thanks in advance!clever-sunset-76585
04/26/2024, 9:56 PMto check if execution was idempotent which I assumed it should be.Yes it should be, without changes. Are you getting this error consistently and do you actually see the DNS record in your cloud console?
hallowed-agent-41624
04/27/2024, 6:40 AMclever-sunset-76585
04/27/2024, 5:37 PMprefix
that you are using as the value of Name
is changing somehow and that's triggering an update.
The error message from the provider is misleading in my opinion. Civo's API is complaining about the value of the type being invalid but you are not changing the type clearly.
Can you try to update the DNS record manually in Civo's console and see if it lets you update it without any issues?hallowed-agent-41624
04/27/2024, 8:32 PM[ERR] an error occurred while renamed the domain record 0b03252e-f4ad-402a-a360-e67d7602473c, Error: Unknown error response - status: 400 Bad Request, code: 400, reason: {"code":"database_dns_record_already_exist","reason":"Failed to create a DNS record name in the internal database, that already exists"}
2. The diff on the pulumi console in the browser shows nothing to change (as seen in the image)clever-sunset-76585
04/28/2024, 3:13 AMpulumi preview --diff
and paste the results just for the DNS domain record?hallowed-agent-41624
04/28/2024, 8:38 AM~ civo:index/dnsDomainRecord:DnsDomainRecord: (update)
[id=0b03252e-f4ad-402a-a360-e67d7602473c]
[urn=urn:pulumi:stg::bringalong::bringalong:infra:cloud:civo$civo:index/dnsDomainRecord:DnsDomainRecord::74.220.31.244]
domainId : "44cdafcc-2316-47ea-b279-60ebd3601d2d"
name : "<http://api-stg.bringalong.io|api-stg.bringalong.io>"
ttl : 600
type : "A"
value : "74.220.31.244"
clever-sunset-76585
04/28/2024, 8:07 PMtype
. Can you try adding type
to the ignoreChanges resource option? (type
should be lower-cased when adding it to ignoreChanges.)hallowed-agent-41624
04/29/2024, 7:13 AMpulumi.IgnoreChanges([]string{"type"})
as well as pulumi.IgnoreChanges([]string{"type", "ttl", "value", "name"})
to the ResourceOptions calling NewDnsDomainRecord
does not make any difference.
Is there a way to check what the API is returning somehow (other than checking it manually)?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by