Skip to content

Commit

Permalink
Created extension of basic resource dependency, defining a dependency…
Browse files Browse the repository at this point in the history
… on KSK for DNSSEC.
  • Loading branch information
JZechy committed Feb 5, 2024
1 parent f555549 commit d6cf284
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
24 changes: 24 additions & 0 deletions Sagittaras.CDK.Testing.Route53/DnsSecDependency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Sagittaras.CDK.Testing.Resources;

namespace Sagittaras.CDK.Testing.Route53;

/// <summary>
/// Class defining DNS SEC dependency on Key Signing Key.
/// </summary>
public class DnsSecDependency : ResourceDependency
{
/// <summary>
///
/// </summary>
/// <param name="kskName">Identification of KSK by its name.</param>
public DnsSecDependency(string kskName)
{
With(new KeySigningKeyAssertion
{
Properties = new KeySigningKeyProperties
{
Name = kskName
}
});
}
}
9 changes: 1 addition & 8 deletions Sagittaras.CDK.Tests.Route53/PublicHostedZoneTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,7 @@ public void Test_DNSSEC()
});
template.Assert(new DnsSecAssertion
{
DependsOn = new ResourceDependency()
.With(new KeySigningKeyAssertion
{
Properties = new KeySigningKeyProperties
{
Name = "examplecom"
}
})
DependsOn = new DnsSecDependency("examplecom")
});
}
}

0 comments on commit d6cf284

Please sign in to comment.