https://pulumi.com logo
#general
Title
# general
c

chilly-hairdresser-56259

06/01/2020, 4:34 PM
I feel like this question has been asked previously, but I have not been able to find it. Is there a way within a single Pulumi program to grab resource references in a seperate AWS account? For example centrally managed DNS one one account, therefore when you create an ACM certificate in Account B, the DNS A Record for Validation would be pushed to Account A in the central account.
g

green-school-95910

06/01/2020, 4:35 PM
You can create two providers
👍 1
m

millions-furniture-75402

06/01/2020, 4:36 PM
yes, you can create another provider, and pass it.
Copy code
const awsSecondProvider = new aws.Provider("account-b", { profile: "account-b", region: "us-east-1" });

const coolSecret: pulumi.Output<string> = pulumi.output(aws.secretsmanager.getSecretVersion({ secretId: "shared-mariadb-database-master-lmy-secret-1234" }, { provider: awsSecondProvider, async: true })).secretString;
☝️ 1
👍 1