Hi,
Are there any samples of filled in templates for CloudFormation? Maybe on github or someplace. I think I have followed the template setup but only part of the parameters load and the rest I need to do manually in the GUI. It would be really nice to have a working sample to compare to. Frustrating to need to re-enter parameters every time. I do not see a way to export after I make the changes on line
Solved! Go to Solution.
You need to add default values for all your parameters. Refer the following aws document
Parameters - AWS CloudFormation (amazon.com)
I have customized parameters to autopopulate my desired values. snippet below
"Parameters": {
........
"ServerLicenseFileKeyName": {
"Type": "String",
"Default": "lic/ArcGISGISServerAdvanced_ArcGISServer.prvc",
"AllowedPattern": "^([/\\w\\-\\.]+)+\\.(ecp|prvc)$",
"ConstraintDescription": "License file name must be alphanumeric. It can contain dash ('-'), dot ('.'), and underscore ('_') characters. The file name must end with '.ecp' or '.prvc'.",
"Description": "Provide the ArcGIS Server authorization file object key name. You must upload the license file ('.ecp' or '.prvc' file) to the deployment bucket before launching this stack. You can get the file object key name by navigating to the file within the deployment bucket in AWS S3 console. For example, 'server.prvc' or 'resources/licenses/109/server/server.prvc'."
},
"SiteadminUserName": {
"Type": "String",
"Default": "myadmin",
"AllowedPattern": "^[a-zA-Z][a-zA-Z0-9_]{6,}$",
"ConstraintDescription": "User name must be 6 or more alphanumeric or underscore (_) characters and must start with a letter.",
"Description": "Provide a user name for the portal administrator and ArcGIS Server site administrator. User name must be 6 or more alphanumeric or underscore (_) characters and must start with a letter.",
"MinLength": 6
},
"SiteadminUserPassword": {
"Type": "String",
"Default": "test",
"AllowedPattern": "^arn:(aws[a-zA-Z-]*)?:secretsmanager:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:secret:[a-zA-Z0-9-/_+=.@]*$|^[a-zA-Z0-9_.@]{8,}$",
"ConstraintDescription": "Password must be 8 or more alphanumeric, underscore (_), at ('@'), or dot (.) characters.",
"Description": "Provide a password for the portal administrator and ArcGIS Server site administrator. You can either type a plain text password or the ARN of your secret ID from AWS Secret Manager. The password must be 8 or more alphanumeric characters and can contain underscore (_), at ('@'), or dot (.) characters. It's a best practice to manage your passwords/secrets through AWS Secret Manager.",
"MinLength": 8
},
.....}
Use optional default parameter as below
"Default" : "t2.micro",
I was looking for a tad more detail. I thought I could setup the json so when it loads it will populate all the parameters, instead of having to enter through the AWS GUI. It seems some do populate from my json, but most do not. Perhaps, I am unlclear on how the template works, but thought to was to simplify repeating the process without having to re-enter things
You need to add default values for all your parameters. Refer the following aws document
Parameters - AWS CloudFormation (amazon.com)
I have customized parameters to autopopulate my desired values. snippet below
"Parameters": {
........
"ServerLicenseFileKeyName": {
"Type": "String",
"Default": "lic/ArcGISGISServerAdvanced_ArcGISServer.prvc",
"AllowedPattern": "^([/\\w\\-\\.]+)+\\.(ecp|prvc)$",
"ConstraintDescription": "License file name must be alphanumeric. It can contain dash ('-'), dot ('.'), and underscore ('_') characters. The file name must end with '.ecp' or '.prvc'.",
"Description": "Provide the ArcGIS Server authorization file object key name. You must upload the license file ('.ecp' or '.prvc' file) to the deployment bucket before launching this stack. You can get the file object key name by navigating to the file within the deployment bucket in AWS S3 console. For example, 'server.prvc' or 'resources/licenses/109/server/server.prvc'."
},
"SiteadminUserName": {
"Type": "String",
"Default": "myadmin",
"AllowedPattern": "^[a-zA-Z][a-zA-Z0-9_]{6,}$",
"ConstraintDescription": "User name must be 6 or more alphanumeric or underscore (_) characters and must start with a letter.",
"Description": "Provide a user name for the portal administrator and ArcGIS Server site administrator. User name must be 6 or more alphanumeric or underscore (_) characters and must start with a letter.",
"MinLength": 6
},
"SiteadminUserPassword": {
"Type": "String",
"Default": "test",
"AllowedPattern": "^arn:(aws[a-zA-Z-]*)?:secretsmanager:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:secret:[a-zA-Z0-9-/_+=.@]*$|^[a-zA-Z0-9_.@]{8,}$",
"ConstraintDescription": "Password must be 8 or more alphanumeric, underscore (_), at ('@'), or dot (.) characters.",
"Description": "Provide a password for the portal administrator and ArcGIS Server site administrator. You can either type a plain text password or the ARN of your secret ID from AWS Secret Manager. The password must be 8 or more alphanumeric characters and can contain underscore (_), at ('@'), or dot (.) characters. It's a best practice to manage your passwords/secrets through AWS Secret Manager.",
"MinLength": 8
},
.....}
@sapnas thank you very much. This is exactly what I needed, everything came in correct. Seems to me this is buried kind of deep in the file, but guess that is how CloudFormation works.