DNS-zone target_resource wrong parameter type?
See original GitHub issue let dns = dnsZone {
name "myZone"
zone_type Dns.Public
add_records [
aRecord {
ttl 60
target_resource trafficMgr.Name
}
yield!
[ "de"; "es";"fr"; "it" ]
|> List.map (fun nm ->
cnameRecord {
name nm
ttl 3600
target_resource trafficMgr.Name
}
)
]
}
Fails for:
"error": {
"code": "LinkedInvalidPropertyId",
"message": "Property id 'myTrafficManager' at path 'properties.targetResource.id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."
}
…so I expect the target_resource
should take ResourceId instead of the current ResourceName
"properties": {
"TTL": 123,
"targetResource": {
"id": "/subscriptions/.../resourcegroups/.../providers/microsoft.network/trafficmanagerprofiles/myTrafficManager"
}
}
Also the traffic manager itself doesn’t have a simple Id property, so I expect it has to be created with something like (ResourceId.create(Farmer.Arm.TrafficManager.profiles, trafficMgr.Name))
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (14 by maintainers)
Top Results From Across the Web
DNS-zone target_resource wrong parameter type?
let dns = dnsZone { name "myZone" zone_type Dns.Public add_records [ aRecord {... ... targetResource.id' is invalid.
Read more >Azure DNS zone · Issue #270 · CompositionalIT/farmer
This is kind of related to #168 because Azure Traffic Managers seems to work best ... This is an ARM-template example for a...
Read more >Tests/xDnsServerPrimaryZone.Tests.ps1 1.5.0.0
Context 'Validates Get-TargetResource Method' { ... Hashtable" object type' { ... It 'Returns "Absent" when DNS zone does not exists and "Ensure" ...
Read more >Record Sets - Create Or Update - REST API (Azure DNS)
Creates or updates a record set within a DNS zone. In this article. URI Parameters; Request Header; Request Body; Responses; Examples; Definitions. HTTP...
Read more >How to create DNS A Record usin Azure CLI or Terraform
You could create an empty A record with --target-resource which points ... variable "target_ip" { type = str description = "Target Resource ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Thorium I think the resourceId expression is failing because the name segments in the CNAME subresource have to be separated.
instead of
use this
This will be fixed by #704 by enabling passing resourceId and builders to
target_resource
on DNS record builders.