aws-cloudformation / aws-cloudformation-samples

Apache License 2.0
133 stars 55 forks source link

Source URL appears to be broken #106

Open jkruse14 opened 2 months ago

jkruse14 commented 2 months ago

This hook started failing recently for us, but I'm not sure what is to blame. The source URL in the CloudFormation console does not match this repository:

image

It links to an non-existent repo here

However, the code links properly:

image

Also, this hook was failing on the update of AWS::RDS::DBCluster. The KmsKeyId configuration is set so encryption can be provided to instances in the cluster. I assume this resource is creating underlying instances on which this hook is run - is that correct?

mrinaudo-aws commented 2 months ago

Hi @jkruse14!

Thank you for evaluating this sample hook. The values for URL-related properties, that today are not matching the updated values in the relevant file in this repository, are not impacting the ability for the hook to evaluate its described target AWS::RDS::DBInstance resource type on preCreate and preUpdate invocation points.

I've tested the AWSSamples::RdsEncrypt::Hook sample hook as follows: first, I've chosen to activate it in my AWS account for the us-east-1 region, I've configured the sample hook with a failure mode of FAIL, and tested as follows:

The example logic for the sample AWSSamples::RdsEncrypt::Hook hook is the same for preCreate and preUpdate invocation points: the example hook checks if the RDS instance class (the value you specify in your template for DBInstanceClass) is part of an exclusion list (in this case, the hook succeeds), or if the StorageEncrypted property you specify in the template is not set to 'true' or is missing (in these case, the hook fails; or succeeds otherwise).

Hope the above helps with the ongoing troubleshooting on your side; as per the URL mismatch, I'll relay the feedback to the team.

Let us know if you have any questions!