title: How to create trust conditions based on reuseable workflows
body: <p>I would like to use OIDC with reuseable workflows.I am not sure if I have to add or remove anything from the condition I have in my assume_role_policy code below. I am able to use the below code successfully when not using reuseable workflows.</p>
  <pre><code>
  resource &quot;aws_iam_openid_connect_provider&quot; &quot;github_oidc_github_actions&quot; {
    url = &quot;https://token.actions.githubusercontent.com&quot;
  
    client_id_list = [&quot;sts.amazonaws.com&quot;]
  
    thumbprint_list = [&quot;a031c46782e6e6c662c2c87c76da9aa62ccabd8e&quot;]
  
  }
  
  
  resource &quot;aws_iam_role&quot; &quot;Reuseable_workflow_Role&quot; {
    name = var.role_name
  
    assume_role_policy = &lt;&lt;EOF
  {
    &quot;Version&quot;:&quot;2012-10-17&quot;,
    &quot;Statement&quot;: {
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Action&quot;: &quot;sts:AssumeRoleWithWebIdentity&quot;,
      &quot;Principal&quot;:{
        &quot;Federated&quot;: &quot;${aws_iam_openid_connect_provider.github_oidc_github_actions.arn}&quot;
      },
      &quot;Condition&quot;:{
        &quot;StringEquals&quot;:{
          &quot;token.actions.githubusercontent.com:sub&quot;: [
            &quot;repo:${var.org_name}/${var.repo_name}:ref:refs/heads/${var.branch_name}&quot;,
            &quot;repo:${var.org_name}/${var.repo_name}:pull_request&quot;
          ]
        }
      }
    }
  }
  EOF
  }
  </code></pre>