Question 4:
You have a Jenkins pipeline to update a CloudFormation stack. The pipeline uses AWS CloudFormation CLI update-stack. Sometimes when the Jenkins job runs, certain AWS resources are recreated, which is not as expected. Your manager asks you to add a step in the pipeline to list the changes that will be applied to the stack. The Jenkins job continues only after the changes are reviewed. How would you modify the Jenkins pipeline?
Answer options:
A.In the new Jenkins step, use AWS CLI --dry-run option to generate a JSON output of the stack update. Review the JSON document before executing the update. B.Use CloudFormation CLI to detect the drift by uploading the updated template. Review the drift and only update the stack after the drift is approved. C.As CloudFormation does not have a CLI command to determine the changes, use terraform plan to print the changes and terraform apply to deploy the changes. D.In the new step, use CloudFormation CLI create-change-set to generate the list of changes that will be applied in the stack. Review the changes before continuing the Jenkins job.