Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/provisioning/Azure.Provisioning.Dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ DnsARecord aRecord = new(nameof(aRecord), DnsARecord.ResourceVersions.V2018_05_0
TtlInSeconds = 3600,
ARecords =
{
new DnsARecordInfo() { Ipv4Addresses = IPAddress.Parse("203.0.113.1") },
new DnsARecordInfo() { Ipv4Addresses = IPAddress.Parse("203.0.113.2") }
new DnsARecordInfo() { Ipv4Address = IPAddress.Parse("203.0.113.1") },
new DnsARecordInfo() { Ipv4Address = IPAddress.Parse("203.0.113.2") }
}
};
infra.Add(aRecord);
Expand Down
10 changes: 5 additions & 5 deletions sdk/provisioning/Azure.Provisioning.Dns/src/DnsARecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ public DnsARecord(string bicepIdentifier, string? resourceVersion = default)
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_name = DefineProperty<string>("Name", ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>("Id", ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>("SystemData", ["systemData"], isOutput: true);
_parent = DefineResource<DnsZone>("Parent", ["parent"], isRequired: true);
_aRecords = DefineListProperty<DnsARecordInfo>("ARecords", ["properties", "ARecords"]);
_name = DefineProperty<string>(nameof(Name), ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>(nameof(Id), ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>(nameof(SystemData), ["systemData"], isOutput: true);
_parent = DefineResource<DnsZone>(nameof(Parent), ["parent"], isRequired: true);
_aRecords = DefineListProperty<DnsARecordInfo>(nameof(ARecords), ["properties", "ARecords"]);
_ttlInSeconds = DefineProperty<long>(nameof(TtlInSeconds), ["properties", "TTL"]);
}

Expand Down
10 changes: 5 additions & 5 deletions sdk/provisioning/Azure.Provisioning.Dns/src/DnsCnameRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ public DnsCnameRecord(string bicepIdentifier, string? resourceVersion = default)
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_name = DefineProperty<string>("Name", ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>("Id", ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>("SystemData", ["systemData"], isOutput: true);
_parent = DefineResource<DnsZone>("Parent", ["parent"], isRequired: true);
_cname = DefineProperty<string>("Cname", ["CNAMERecord", "cname"]);
_name = DefineProperty<string>(nameof(Name), ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>(nameof(Id), ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>(nameof(SystemData), ["systemData"], isOutput: true);
_parent = DefineResource<DnsZone>(nameof(Parent), ["parent"], isRequired: true);
_cname = DefineProperty<string>(nameof(Cname), ["properties", "cname"]);
_ttlInSeconds = DefineProperty<long>(nameof(TtlInSeconds), ["properties", "TTL"]);
}

Expand Down
10 changes: 5 additions & 5 deletions sdk/provisioning/Azure.Provisioning.Dns/src/DnsTxtRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public DnsTxtRecord(string bicepIdentifier, string? resourceVersion = default)
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_name = DefineProperty<string>("Name", ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>("Id", ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>("SystemData", ["systemData"], isOutput: true);
_txtRecords = DefineListProperty<DnsTxtRecordInfo>("TxtRecords", ["properties", "TXTRecords"]);
_parent = DefineResource<DnsZone>("Parent", ["parent"], isRequired: true);
_name = DefineProperty<string>(nameof(Name), ["name"], isRequired: true);
_id = DefineProperty<ResourceIdentifier>(nameof(Id), ["id"], isOutput: true);
_systemData = DefineModelProperty<SystemData>(nameof(SystemData), ["systemData"], isOutput: true);
_txtRecords = DefineListProperty<DnsTxtRecordInfo>(nameof(TxtRecords), ["properties", "TXTRecords"]);
_parent = DefineResource<DnsZone>(nameof(Parent), ["parent"], isRequired: true);
_ttlInSeconds = DefineProperty<long>(nameof(TtlInSeconds), ["properties", "TTL"]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace Azure.Provisioning.Dns;
/// </summary>
public partial class DnsARecordInfo : ProvisionableConstruct
{
public BicepValue<IPAddress> Ipv4Addresses
public BicepValue<IPAddress> Ipv4Address
{
get { Initialize(); return _ipv4Addresses!; }
set { Initialize(); _ipv4Addresses!.Assign(value); }
get { Initialize(); return _ipv4Address!; }
set { Initialize(); _ipv4Address!.Assign(value); }
}
private BicepValue<IPAddress>? _ipv4Addresses;
private BicepValue<IPAddress>? _ipv4Address;

/// <summary>
/// Creates a new DnsARecordInfo.
Expand All @@ -33,6 +33,6 @@ public DnsARecordInfo()
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_ipv4Addresses = DefineProperty<IPAddress>("IPv4Addresses", ["ipv4Addresses"], isRequired: true);
_ipv4Address = DefineProperty<IPAddress>(nameof(Ipv4Address), ["ipv4Address"], isRequired: true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace Azure.Provisioning.Dns;
/// </summary>
public partial class DnsAaaaRecordInfo : ProvisionableConstruct
{
public BicepValue<IPAddress> Ipv6Addresses
public BicepValue<IPAddress> Ipv6Address
{
get { Initialize(); return _ipv6Addresses!; }
set { Initialize(); _ipv6Addresses!.Assign(value); }
get { Initialize(); return _ipv6Address!; }
set { Initialize(); _ipv6Address!.Assign(value); }
}
private BicepValue<IPAddress>? _ipv6Addresses;
private BicepValue<IPAddress>? _ipv6Address;

/// <summary>
/// Creates a new DnsAaaaRecordInfo.
Expand All @@ -33,6 +33,6 @@ public DnsAaaaRecordInfo()
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_ipv6Addresses = DefineProperty<IPAddress>("IPv6Addresses", ["ipv6Addresses"]);
_ipv6Address = DefineProperty<IPAddress>("IPv6Address", ["ipv6Address"]);
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent use of nameof operator. While DnsARecordInfo uses nameof(Ipv4Address) for consistency, this file still uses the string literal "IPv6Address". For consistency, this should be nameof(Ipv6Address) to match the pattern used in DnsARecordInfo.cs.

Suggested change
_ipv6Address = DefineProperty<IPAddress>("IPv6Address", ["ipv6Address"]);
_ipv6Address = DefineProperty<IPAddress>(nameof(Ipv6Address), ["ipv6Address"]);

Copilot uses AI. Check for mistakes.
}
}
Loading