cdk-pipelines-github
cdk-pipelines-github copied to clipboard
JobStep 'with' keyword causing syntax errors - Python
Hey everyone, I am attempting to use cdk-pipelines-github and I believe I found an issue. I am trying to define a step within a job, and one of the property keys is ‘with,’ a Python keyword causing syntax errors in this context. Here is the documentation showing such. Job Step documentation
Below is the specific code block where I am trying to configure AWS credentials using the CDK pipelines GitHub constructs
cdk_pipelines_github.JobStep(
name = f"Configure AWS Credentials FOR {environment}",
uses = "aws-actions/configure-aws-credentials@v2",
with = {"role-to-assume": f"arn:aws:iam::{account}:role/{deployment_role}",
"role-session-name": f"cdk-deployment-{region}-{account}",
"aws-region": region},
)
Here is the code block with the GitHub Action step I am trying to replicate above.
# Configure AWS Creds
- name: Configure AWS Credentials ${{ inputs.environment }}
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ vars.ACCOUNT_ID }}:role/CDKDeploymentRole-${{ vars.REGION }}-${{ vars.ACCOUNT_ID }}
role-session-name: cdk-deployment-${{ vars.REGION }}-${{ vars.ACCOUNT_ID }}
aws-region: ${{ vars.REGION }}
-
A reproducible test case or series of steps
- Try and configure a job step that requires use of the 'with' keyword like my example above. This would also be needed for any reusable workflow the requires inputs.
-
The version of our code being used
- v0.4.72
-
Any modifications you've made relevant to the bug
- None
-
Anything unusual about your environment or deployment
- I don't believe anything about the environment would be causing this issue. I can think of nothing out of the ordinary with our environment.