https://pulumi.com logo
Title
f

flaky-finland-22550

05/25/2023, 11:47 AM
Hello Team, Good morning. I am having a bit of challenge executing this task. I would appreciate any help. I have two AWS accounts, for production and dev environments. I have a domain (example.com) in Route53 of the production account. However, I want to create a new stack and deploy to the dev environment. If the stack name is testing, it should create a record in the production environment as testing.example.com, and then create a hosted zone in the dev account.
s

salmon-account-74572

05/25/2023, 4:23 PM
I’ll give you a couple high-level tips that should help. 1. To work with two different AWS accounts, you’ll need two different AWS providers. You can define explicit providers in your Pulumi program and then specify, for each resource, which provider should be used. 2. You can programmatically retrieve the stack name in your program, and then use that in a conditional (like determining which provider to use). All in all, what you’re describing sounds entirely doable.
f

flaky-finland-22550

05/26/2023, 9:58 AM
Thank you, @salmon-account-74572. I will try this out and give you feedback.
@salmon-account-74572 Please, correct me if I am wrong. 1. I will create a Route53 record in the production account. 2. Create a hosted zone in the dev account.
s

salmon-account-74572

05/26/2023, 7:00 PM
I’m not really sure what you’re trying to achieve, so I can’t tell you if what you’re suggesting is correct or not. Also, be aware that I’m going to be OOO (out of office) for the next week, so any further replies may be delayed. Good luck!
f

flaky-finland-22550

05/30/2023, 7:41 AM
Hello @salmon-account-74572. Let me try to break the task down. The parent domain is inside the Production account (example.com). And under that domain, a subdomain, a subdomain was created (dev.example.com), where dev is the stack name. Now what I want to achieve is the use of ephemeral environments. So now, when I create a name stack, say testing, it should have that record registered on the production account as (testing.example.com).
d

delightful-salesclerk-16161

05/30/2023, 6:30 PM
Scott is out this week but will be back next week.
f

flaky-finland-22550

05/30/2023, 8:20 PM
Thank you.
I have been able to solve this.