-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support command flags such as --config
#716
Comments
Hi @jessicayuen. The
...but then I can see it descends into madness. I think the feature you're looking for is the
I'm sorry if my suggestion isn't quite right, I haven't used this feature myself yet. |
@RobbieMcKinstry Thanks for the response, I just tried using config-map but I am getting a github actions lint error:
I've tried both formats below.
Is it possible I'm configuring this wrong? |
I'm also experiencing the same error while specifying config map values with my flows, I have the following notation - name: Deploy with pulumi
uses: pulumi/actions@v3
with:
command: up
stack-name: ${{ steps.stack_name.outputs.stack_name }}
work-dir: ./infrastructure
upsert: true
config-map: "{config: {'gcp:project':my-project, 'gcp:region': us-central1}}" |
Sorry for the slow reply.
Yes, I think this is user error, but I'm not certain. I haven't had a chance to reproduce yet. Providing config is new feature, so I'm not as sharp in this area as I could be :) I'll attempt to reproduce and report back. |
Hi @RobbieMcKinstry! Were you able to reproduce the issue? |
Whilst the original users issue may be user error, the ability to supply flags is missing (and not solved via the config-map parameter). Perhaps this is what should be the target? EDIT: |
Hi @jessicayuen. I'm sorry I haven't gotten back to you on this yet. I haven't had the bandwidth yet to attempt a reproduction. You might have some luck getting help on the Community Slack since I'm afraid I might not have time myself. |
I agree that it's illogical and IMO ultimately unhelpful.
I think the approach would be to accept options |
@jessicayuen @elMolda I am not sure if you guys are still dealing with the problem but I wanted to share what was wrong with your definitions. The
which can be defined like this for
and you can use it in your flow now: - name: Deploy with pulumi
uses: pulumi/actions@v3
with:
command: preview
stack-name: dev
work-dir: infra
config-map: "{env: {value: dev, secret: false}, my-app:releasetag: { value: sandbox, secret: false}}" |
Thanks @serdarkkts, that was really helpful. It's just nice to see an example with these things! If anyone else is wondering how you format larger configs including GitHub secrets, here's how I did it for Azure: - name: Deploy with pulumi
uses: pulumi/actions@v3
with:
command: preview
stack-name: dev
work-dir: infra
config-map: "{
azure-native:clientId: {value: '${{ secrets.AZURE_DETAILS_CLIENT_ID }}', secret: false},
azure-native:clientSecret: {value: '${{ secrets.AZURE_DETAILS_CLIENT_SECRET }}', secret: true},
azure-native:location: {value: 'westeurope', secret: false},
azure-native:subscriptionId: {value: '${{ secrets.AZURE_DETAILS_SUBSCRIPTION_ID }}', secret: false},
azure-native:tenantId: {value: '${{ secrets.AZURE_DETAILS_TENANT_ID }}', secret: false},
environment:size: {value: 'xs', secret: false},
environment:type: {value: 'testing', secret: false}
}" You can use multi-line double-quoted strings to help make it easier on the eyes. |
@serdarkkts @kiweezi Thank you for the examples! They helped a lot and did work for me. I'm back with a question about complex value types that aren't The following
I'm reading it as follows:
error: For additional context, I am able to load the configs fine outside of github actions using the following config:
Are complex value types supported? If yes, what am I doing wrong? |
@jessicayuen I am not sure if this can work but I would try setting the values for each key separately: - name: Deploy with pulumi
uses: pulumi/actions@v3
with:
command: preview
stack-name: dev
work-dir: infra
config-map: "{
tokens:GITHUB_TOKEN: {value: '${{ secrets.CI_BOT_ACCESS_TOKEN }}', secret: false},
tokens:PAGERDUTY_ACCOUNT_TOKEN: {value: '${{ secrets.PAGERDUTY_RW_KEY }}', secret: false},
env: {value: 'dev', secret: false}
}" |
I could be very wrong here, but I think you need a multiline string in config-map: |
{
env: { value: dev, secret: false },
tokens: {
value: {
"GITHUB_TOKEN": "${{ secrets.CI_BOT_ACCESS_TOKEN }}",
"PAGERDUTY_ACCOUNT_TOKEN": "${{ secrets.PAGERDUTY_RW_KEY }}"
},
secret: false
}
} |
Hi, I'm sorry if this is slightly off-topic, but has anyone tried using this config-map with multi-line values? e.g. for setting up a GCP SSLCertificate from a PEM certificate string via config. If this is not supported then I would also vote for this feature to support --config-file |
Here is what I was able to get working: config-map: |
env:
value: |
{
"MY_VAR_1": "some-value",
"MY_VAR_2": "${{ secrets.MY_SECRET }}",
"MY_VAR_3": "${{ secrets.MY_OTHER_SECRET }}"
}
secret: false |
Hello!
Issue details
Affected area/feature
Use Case
I am building an automated release workflow. When I publish a Github release, I want to supply the following command in order to properly tag my AWS ECR image with the release version.
and in the pulumi code:
Problem
Running pulumi preview with the config flag via console works, but it does not appear to be currently supported through the Github Actions. I get an error.
The text was updated successfully, but these errors were encountered: