agreeable-whale-35898
02/08/2024, 3:12 PMone/
, I just need to type pulumi up
and that's it, and when in the other project's directory, two/
- the same: just type pulumi up
and that's it.
But it's not convenient, because I must always run pulumi logout
, then pulumi login
to switch from one project to the other (as they are managed in different Pulumi accounts).
In Terraform it's very simple: the backend
is bound to a specific AWS account and managed there, so everything is local: I just run terraform apply --var-file=dev.tfvars
and provider aws { profile = var.profile ...
binds it to the right profile / account.
Do you have any idea how to make it simple as that in Pulumi too?
Is it possible to keep all "login" / "profile" info located in the project directory and not having to switch accounts again and again?salmon-account-74572
02/08/2024, 3:26 PMbackend.url
value you can add to your project configuration that might help. More details here: https://www.pulumi.com/docs/concepts/state/little-cartoon-10569
02/08/2024, 6:45 PMagreeable-whale-35898
02/08/2024, 8:11 PMPulumi.yaml
file) the name of the AWS provider e.g.:
config:
aws:profile: specific_profile_name
agreeable-whale-35898
02/08/2024, 8:27 PMbackend:
url: file://.
and I believe that url: s3://...
will fit when we advancesalmon-account-74572
02/08/2024, 8:28 PMlittle-cartoon-10569
02/08/2024, 8:34 PMpulumi login
.
Which AWS account (and indeed, region) you are using is defined by instances of aws.Provider: account is Provider. You should probably read up on that class and what it can do. It will help you avoid similar problems in the future.
https://www.pulumi.com/registry/packages/aws/api-docs/provider/