aws:aws-cloudformation-parameters-mappings-refs
Differences
This shows you the differences between two versions of the page.
| aws:aws-cloudformation-parameters-mappings-refs [06/08/2024 09:29] – created - external edit 127.0.0.1 | aws:aws-cloudformation-parameters-mappings-refs [30/05/2025 09:39] (current) – removed andrew | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Parameters, Mappings, and !Refs ===== | ||
| - | |||
| - | |||
| - | ==== Parameters ==== | ||
| - | |||
| - | <code yaml> | ||
| - | --- | ||
| - | Parameters: | ||
| - | ParameterTest: | ||
| - | Type: String | ||
| - | Description: | ||
| - | |||
| - | Resources: | ||
| - | BasicParameter: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | Name: AJS-testPara | ||
| - | Type: String | ||
| - | Value: !Ref ParameterTest | ||
| - | Description: | ||
| - | Tags: | ||
| - | Environment: | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | ==== Mappings ==== | ||
| - | |||
| - | <code yaml> | ||
| - | --- | ||
| - | Parameters: | ||
| - | Environment: | ||
| - | Description: | ||
| - | Type: String | ||
| - | Default: Development | ||
| - | AllowedValues: | ||
| - | - Production | ||
| - | - Development | ||
| - | Mappings: | ||
| - | AMIRegions_Map: | ||
| - | eu-west-1: | ||
| - | Development: | ||
| - | Production: | ||
| - | eu-west-2: | ||
| - | Development: | ||
| - | Production: | ||
| - | us-east-1: | ||
| - | Development: | ||
| - | Production: | ||
| - | Resources: | ||
| - | WebEC2Instance: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | ImageId: !FindInMap [AMIRegions_Map, | ||
| - | InstanceType: | ||
| - | </ | ||
| - | |||
| - | |||
| - | ==== Passing parameters in to a cloudformation file ==== | ||
| - | |||
| - | |||
| - | Declare Variables in Parameters section of CF script | ||
| - | |||
| - | <code yaml> | ||
| - | --- | ||
| - | Parameters: | ||
| - | VPCName: | ||
| - | Type: String | ||
| - | Description: | ||
| - | |||
| - | Resources: | ||
| - | BasicParameter: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | Name: AJS-test-VPC-Name | ||
| - | Type: String | ||
| - | Value: !Ref VPCName | ||
| - | Description: | ||
| - | Tags: | ||
| - | Environment: | ||
| - | </ | ||
| - | |||
| - | <code bash> | ||
| - | #!/bin/bash | ||
| - | |||
| - | aws cloudformation create-stack \ | ||
| - | --stack-name Stack1 \ | ||
| - | --template-body file:// | ||
| - | --capabilities CAPABILITY_NAMED_IAM \ | ||
| - | --parameters \ | ||
| - | ParameterKey=VPCName, | ||
| - | </ | ||
| - | |||
| - | This page has been accessed for:- \\ | ||
| - | Today: {{counter|today}} \\ | ||
| - | Yesterday: {{counter|yesterday}} \\ | ||
| - | Until now: {{counter|total}} \\ | ||
aws/aws-cloudformation-parameters-mappings-refs.1722936542.txt.gz · Last modified: by 127.0.0.1
