diff --git a/src/AWS.Deploy.CLI/Commands/TypeHints/EnvironmentArchitectureCommand.cs b/src/AWS.Deploy.CLI/Commands/TypeHints/EnvironmentArchitectureCommand.cs index 71f97138..e55a842e 100644 --- a/src/AWS.Deploy.CLI/Commands/TypeHints/EnvironmentArchitectureCommand.cs +++ b/src/AWS.Deploy.CLI/Commands/TypeHints/EnvironmentArchitectureCommand.cs @@ -31,7 +31,8 @@ public Task GetResources(Recommendation recommendation, O } }; - foreach (var value in recommendation.Recipe.SupportedArchitectures ?? new List { SupportedArchitecture.X86_64 }) + foreach (var value in recommendation.Recipe.SupportedArchitectures ?? + new List { Enum.Parse(Constants.Recipe.DefaultSupportedArchitecture) }) { var stringValue = value.ToString(); var row = new TypeHintResource(stringValue, stringValue); diff --git a/src/AWS.Deploy.Common/DeploymentBundles/DeploymentBundle.cs b/src/AWS.Deploy.Common/DeploymentBundles/DeploymentBundle.cs index 677fd7b2..36051116 100644 --- a/src/AWS.Deploy.Common/DeploymentBundles/DeploymentBundle.cs +++ b/src/AWS.Deploy.Common/DeploymentBundles/DeploymentBundle.cs @@ -1,6 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 +using System; using AWS.Deploy.Common.Recipes; namespace AWS.Deploy.Common @@ -69,6 +70,6 @@ public class DeploymentBundle /// /// The CPU architecture of the environment to create. /// - public SupportedArchitecture EnvironmentArchitecture { get; set; } = SupportedArchitecture.X86_64; + public SupportedArchitecture EnvironmentArchitecture { get; set; } = Enum.Parse(Constants.Recipe.DefaultSupportedArchitecture); } } diff --git a/src/AWS.Deploy.Constants/AWS.Deploy.Constants.projitems b/src/AWS.Deploy.Constants/AWS.Deploy.Constants.projitems index 7ea42a2b..1860c559 100644 --- a/src/AWS.Deploy.Constants/AWS.Deploy.Constants.projitems +++ b/src/AWS.Deploy.Constants/AWS.Deploy.Constants.projitems @@ -15,6 +15,7 @@ + \ No newline at end of file diff --git a/src/AWS.Deploy.Constants/Recipe.cs b/src/AWS.Deploy.Constants/Recipe.cs new file mode 100644 index 00000000..c1da5b7c --- /dev/null +++ b/src/AWS.Deploy.Constants/Recipe.cs @@ -0,0 +1,13 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\r +// SPDX-License-Identifier: Apache-2.0 + +namespace AWS.Deploy.Constants +{ + internal class Recipe + { + /// + /// The default supported architecture + /// + public const string DefaultSupportedArchitecture = "X86_64"; + } +} diff --git a/src/AWS.Deploy.Orchestration/Orchestrator.cs b/src/AWS.Deploy.Orchestration/Orchestrator.cs index b20221d0..1c8245b6 100644 --- a/src/AWS.Deploy.Orchestration/Orchestrator.cs +++ b/src/AWS.Deploy.Orchestration/Orchestrator.cs @@ -246,7 +246,7 @@ public async Task ApplyAllReplacementTokens(Recommendation recommendation, strin } if (recommendation.ReplacementTokens.ContainsKey(Constants.RecipeIdentifier.REPLACE_TOKEN_DEFAULT_ENVIRONMENT_ARCHITECTURE)) { - recommendation.AddReplacementToken(Constants.RecipeIdentifier.REPLACE_TOKEN_DEFAULT_ENVIRONMENT_ARCHITECTURE, SupportedArchitecture.X86_64.ToString()); + recommendation.AddReplacementToken(Constants.RecipeIdentifier.REPLACE_TOKEN_DEFAULT_ENVIRONMENT_ARCHITECTURE, Constants.Recipe.DefaultSupportedArchitecture); } }