title: Problem passing parameters created in Terraform to CloudFormation
body: <p>Using guidance from a previous SO post: [https://stackoverflow.com/questions/43266506/is-it-possible-to-execute-a-cloudformation-file-in-terraform]:</p>
  <p>I am trying to pass two parameters created in my Terraform template into a Cloudformation template as parameters:</p>
  <p>My terraform (v.0.13.5) code:</p>
  <pre><code>    resource &quot;aws_cloudformation_stack&quot; &quot;cloudwatch-synthetics-canary&quot; {
        provider = aws.primary
        name          = &quot;cloudwatch-synthetics&quot;
        parameters = {
          CloudWatchSyntheticsRole = aws_iam_role.cloudwatch_synthetics_role.arn,
          ResultsBucket = aws_s3_bucket.results_bucket.arn
        }
        template_body = file(&quot;${path.module}/cloudwatch_canary.yml&quot;)
      }
  
  resource &quot;aws_iam_role&quot; &quot;cloudwatch_synthetics_role&quot; {
    provider           = aws.primary
    name               = &quot;CloudWatchSyntheticsRole&quot;
    description        = &quot;Allows Cloudwatch Lambda to operate in this account.&quot;
    assume_role_policy = &lt;&lt;POLICY
  {
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
      {
        &quot;Sid&quot;: &quot;AllowLambdaAssumeRole&quot;,
        &quot;Effect&quot;: &quot;Allow&quot;,
        &quot;Principal&quot;: {
          &quot;Service&quot;: &quot;lambda.amazonaws.com&quot;
        },
        &quot;Action&quot;: &quot;sts:AssumeRole&quot;
      }
    ]
  }
  POLICY
  }
  
  resource &quot;aws_iam_policy&quot; &quot;cloudwatch_synthetics_role_policy&quot; {
    provider    = aws.primary
    name        = &quot;CloudWatchSyntheticsRolePolicy&quot;
    path        = &quot;/&quot;
    description = &quot;Addtional allowances for the synthetics role&quot;
  
    policy = &lt;&lt;EOF
  {
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
  
      # --- SNIPPED FOR BREVITY ---
  
    ]
  }
  EOF
  }
  
  resource &quot;aws_iam_role_policy_attachment&quot; &quot;cloudwatch_synthetics_role_policy_attachment&quot; {
    provider = aws.primary
    role       = aws_iam_role.cloudwatch_synthetics_role.name
    policy_arn = aws_iam_policy.cloudwatch_synthetics_role_policy.arn
  }
  </code></pre>
  <p>My Cloudformation code:</p>
  <pre><code>Parameters:
    CanaryName:
      Type: String
      Default: my-canary
      MaxLength: 21
    HostName:
      Type: String
      Default: api.myhost.net
      MaxLength: 128
    Path:
      Type: String
      Default: /v1/status
      MaxLength: 256
    Port:
      Type: Number
      Default: 443
    CloudWatchSyntheticsRole:
      Type: AWS::IAM::Role
    ResultsBucket:
      Type: AWS::S3::Bucket
  ...
  
  Resources:
     ExecutionRoleArn:
        Fn::GetAtt:
           - CloudWatchSyntheticsRole
           - Arn             # &lt;-- TRIED WITH AND WITHOUT THIS
  </code></pre>
  <p>In Terraform.io, the error is as follows:</p>
  <pre><code>Error: Creating CloudFormation stack failed: ValidationError: Template error: instance of Fn::GetAtt references undefined resource CloudWatchSyntheticsRole
      status code: 400, request id: 694c...
  </code></pre>
  <p>I tried making the types in the CFT as Strings, but that didn't seem to work, either. The Fn::GetAtt: also had '- Arn' below the CloudwatchSyntheticsRole to refer to the Arn, but since I'm passing that in directly, I tried removing it.</p>
  <p>I feel like I'm close, but missing something and just need some help from some fresh eyes.</p>