Run multiple userdata scripts on EC2 instance | AWS

I have multiple powershell scripts which i need to run in ec2 userdata.

data “template_file” “userdata” {
template = file(“userdata.ps1”)
}
data “template_file” “userdata1” {
template = file(“userdata1.ps1”)
}
data “template_cloudinit_config” “cloudinit-example” {
gzip = false
base64_encode = false
part {
filename = “userdata.ps1”
content_type = “text/cloud-config”
content = data.template_file.userdata.rendered
}
part {
filename = “userdata1.ps1”
content_type = “text/cloud-config”
content = data.template_file.userdata1.rendered
}
}
resource “aws_instance” “ec2” {
ami = “ami-0e484c84e6d59f3a3”
instance_type = “t2.medium”
key_name = “cp-dev-GA”
iam_instance_profile = “admin-access-test”
user_data = data.template_cloudinit_config.cloudinit-example.rendered
}

none of the powershell scripts gets executed. Anything i am missing here

did you find answer to this question?