Skip to content
Discussion options

You must be logged in to vote

Looks like it's creating a hash for each domain and because I use tokens, it's changing every update/deploy. Since I use the valueForStringParameter, it has a different token each time, which is hashed into a new value too.

Here's the source code from the package that was causing the issue:

domainNames.forEach((domainName) => {
      const hash = md5hash(domainName).slice(0, 6);
      const aliasProps = {
        recordName: domainName,
        zone: props.zone,
        target: RecordTarget.fromAlias(new CloudFrontTarget(redirectDist)),
      };
      new ARecord(this, `RedirectAliasRecord${hash}`, aliasProps);
      new AaaaRecord(this, `RedirectAliasRecordSix${hash}`, aliasProps);
    });

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by NiallJoeMaher
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant