Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29259

AWS CodePipeline, how use parameter override section in config file into.ebextensions folder

$
0
0

in my CodePipeline, stage GenerateChangeSet, I have this under Advanced -> Parameter override

{ "ProjectId":"myproj-fe", "InstanceType":"t2.micro", "KeyPairName":"myproj-fe", "SubnetId":"subnet-5b25ddc3", "VpcId":"vpc-033r2013", "SolutionStackName":"64bit Amazon Linux 2018.03 v3.3.0 running Tomcat 8.5 Java 8", "EBTrustRole":"CodeStarWorker-myproj-fe-EBService", "EBInstanceProfile":"awscodestar-myproj-fe-EBInstanceProfile-I6YC114XKA1X", "Stage":"-test" }

I want to read "Stage" parameter from my environment.config into folder .ebextensions to use different properties if I am in "-test" or "-prod" stage.

I tried various combination on property "Stage" and keywords without success.. This is my base code


{
  "Parameters" : {
    "Stage" : {
      "Type" : "String"
    }
  },
  "Conditions" : {
    "CreateProdResources" : {"Fn::Equals" : [{"Ref" : "Stage"}, "-prod"]},
    "CreateTestResources" : {"Fn::Equals" : [{"Ref" : "Stage"}, "-test"]}
  },
    "Resources" : {   "ProdEnvironment" : {
      "Type" : "aws:elasticbeanstalk:application:environment",
      "Condition" : "CreateProdResources",
      "Properties" : {
        "keyprod" : "keyprod1",
        "keytest" : "keytest2"
      }
    },
    "TestEnvironment" : {
      "Type" : "aws:elasticbeanstalk:application:environment",
      "Condition" : "CreateTestResources",
      "Properties" : {
        "keyprod" : "keyprod3",
        "keytest" : "keytest4"
      }
    }
  }
}

I see this https://docs.aws.amazon.com/en_us/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-parameter-override-functions.html but it doesn't help me

Thanks


Viewing all articles
Browse latest Browse all 29259

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>