Skip to content
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 for account specific deploys #2360

Open
McDoit opened this issue Dec 20, 2024 · 1 comment
Open

Support for account specific deploys #2360

McDoit opened this issue Dec 20, 2024 · 1 comment
Labels
feature-request New feature or request needs-product-input Needs non-technical requirements or direction to proceed

Comments

@McDoit
Copy link

McDoit commented Dec 20, 2024

Environment information

System:
  OS: Windows 10 10.0.19045
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  Memory: 1.11 GB / 15.73 GB
Binaries:
  Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
  Yarn: undefined - undefined
  npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.5.1
  @aws-amplify/backend: 1.10.0
  @aws-amplify/backend-auth: 1.4.2
  @aws-amplify/backend-cli: 1.4.4
  @aws-amplify/backend-data: 1.2.3
  @aws-amplify/backend-deployer: 1.1.12
  @aws-amplify/backend-function: 1.10.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.4
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.4
  @aws-amplify/cli-core: 1.2.1
  @aws-amplify/client-config: 1.5.4
  @aws-amplify/deployed-backend-client: 1.5.0
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.10
  @aws-amplify/platform-core: 1.4.0
  @aws-amplify/plugin-types: 1.6.0
  @aws-amplify/sandbox: 1.2.8
  @aws-amplify/schema-generator: 1.2.6
  aws-amplify: 6.10.3
  aws-cdk: 2.173.2
  aws-cdk-lib: 2.173.2
  typescript: 5.7.2
No AWS environment variables
No CDK environment variables

Describe the feature

Related to #999 but didnt find any followup feature request for this

In dotnet i solved it by having this wrapper for the environment:

public class EnvironmentWrapper
{
    public static Amazon.CDK.Environment ConstructEnvironment(string account = null, string region = null)
    {
        return new Amazon.CDK.Environment
        {
            Account = System.Environment.GetEnvironmentVariable("CDK_DEPLOY_ACCOUNT") ??
                      account ??
                      System.Environment.GetEnvironmentVariable("CDK_DEFAULT_ACCOUNT"),
            Region = System.Environment.GetEnvironmentVariable("CDK_DEPLOY_REGION") ??
                     region ??
                     System.Environment.GetEnvironmentVariable("CDK_DEFAULT_REGION")
        };
    }
}

It provides a few ways of overriding it, or otherwise go for the default options of nothing, if no overrides are provided
Adding a typescript version like this to the creation of the AmplifyStack shouldn't break any existing deployments but add the possibility to go specific if needed

Use case

There is a few resources in CDK which you might rather want to do lookups for than hard code its value
My specific one now is VPC, to look up the one created by an outside CDK stack
But same applies for AMIs and parameters etc

@McDoit McDoit added the pending-triage Incoming issues that need categorization label Dec 20, 2024
@ykethan
Copy link
Member

ykethan commented Dec 20, 2024

Thank you for filing this, marking as feature request.

@ykethan ykethan added feature-request New feature or request needs-product-input Needs non-technical requirements or direction to proceed and removed pending-triage Incoming issues that need categorization labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request needs-product-input Needs non-technical requirements or direction to proceed
Projects
None yet
Development

No branches or pull requests

2 participants