https://pulumi.com logo
#automation-api
Title
# automation-api
c

creamy-window-21036

09/29/2022, 7:26 PM
Hi, I need help to understand, can we even do it? I am using inline python code to create eks cluster and I also have s3 backend configured this way 👇
Copy code
project_settings=auto.ProjectSettings(
    name=project_name,
    runtime="python",
    backend={"url": "<s3://bucket-in-different-region-or-other-account>"})
stack = auto.create_or_select_stack(stack_name=stack_name,
                                    project_name=project_name,
                                    program=pulumi_program,
                                    opts=auto.LocalWorkspaceOptions(project_settings=project_settings,
                                                                    secrets_provider=secrets_provider}))
I am using pulumi_eks to provision a cluster
Copy code
import pulumi_eks as eks
eks.Cluster(...)
Is there a way to to pass seperate credential to both of the context? I mean separate creds for pulumi login and separate creds to provision EKS cluster
l

little-cartoon-10569

09/29/2022, 7:57 PM
Yes. The backend login is controlled via your current AWS creds: default profile, explicit profile (AWS_PROFILE=xyz), whatever. The in-Pulumi (resource-creating) provider uses whatever creds you tell it to use. If you don't supply a provider, that's the default creds, same as the backend. If you need different creds, just create an instance of aws.Provider and pass it to the resources via the opt provider (or providers, which is a map, and the key would be "aws").
🙌 1
3 Views