Skip to content

Commit

Permalink
Merge pull request #3 from WhitWaldo/batch-fixes
Browse files Browse the repository at this point in the history
Fixing several issues in Azure Batch contribution
  • Loading branch information
rudiv authored May 18, 2024
2 parents 41b9def + 0f621da commit 0ffd1a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public BatchAccountResource(string name) : base(resourceType)

protected override void ValidateResourceType()
{
if (Name.MatchesConstraints(3, 24, StringExtensions.CharacterClass.LowercaseLetter))
if (!AccountName.MatchesConstraints(3, 24, StringExtensions.CharacterClass.LowercaseLetter))
{
throw new InvalidOperationException(
"Name must be between 3-24 characters and must contain only lowercase letters and numbers");
Expand Down Expand Up @@ -159,12 +159,12 @@ private void AddNetworkProfile(BicepResourcePropertyBag bag)
}
networkProfileBag.AddProperty(accountAccessBag);


//NOde management access
//Node management access
var nodeManagementAccessBag = new BicepResourcePropertyBag("nodeManagementAccess", 3)
.AddProperty("defaultAccess",
new BicepStringValue(
Properties.NetworkProfile.NodeManagementAccess.DefaultAction.GetValueFromEnumMember()));
networkProfileBag.AddProperty(nodeManagementAccessBag);

var nodeIpRules = new BicepResourcePropertyArray("ipRules", 4);
foreach (var rule in Properties.NetworkProfile.NodeManagementAccess.IpRules)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ public sealed class BatchCertificateResource : BicepResource

public string Thumbprint { get; set; }

public string ThumbprintAlgorithm => "SHA1";
public static string ThumbprintAlgorithm => "SHA1";


public BatchCertificateResource(BatchAccountResource parent, string name) : base(resourceType)

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / publish

Non-nullable property 'Data' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / publish

Non-nullable property 'Thumbprint' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / publish

Non-nullable property 'Data' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / publish

Non-nullable property 'Thumbprint' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
{
Parent = parent;
Expand Down

0 comments on commit 0ffd1a4

Please sign in to comment.