#This solution, non-production-ready template describes AWS Codepipeline based CICD Pipeline for terraform code deployment. #© 2023 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. #This AWS Content is provided subject to the terms of the AWS Customer Agreement available at #http://aws.amazon.com/agreement or other written agreement between Customer and either #Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both. resource "aws_iam_role" "codepipeline_role" { count = var.create_new_role ? 1 : 0 name = var.codepipeline_iam_role_name tags = var.tags assume_role_policy = <