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 objects in FN::Map #14

Open
hoegertn opened this issue Mar 24, 2016 · 1 comment
Open

Support objects in FN::Map #14

hoegertn opened this issue Mar 24, 2016 · 1 comment

Comments

@hoegertn
Copy link
Contributor

I would really love the following to be possible:
(syntax is just a proposal)

"Fn::Map": [
            [
              {"zone":"a","net":"0"},
              {"zone":"b","net":"1"},
              {"zone":"c","net":"2"}
            ],
            "az",
            {
              "Subnet${az.zone}": {
                "Type": "AWS::EC2::Subnet",
                "Properties": {
                  "VpcId": {
                    "Ref": "VPC"
                  },
                  "AvailabilityZone": {
                    "Fn::Join": [
                      "",
                      [
                        {
                          "Ref": "AWS::Region"
                        },
                        "${az.zone}"
                      ]
                    ]
                  },
                  "CidrBlock": "192.168.${az.net}.0/24",
                  "MapPublicIpOnLaunch": true
                }
              }
            }
          ]

@monken Do you think this is possible?

@monken
Copy link
Owner

monken commented Mar 24, 2016

You should be able to do this today with referencing a structure in the Mappings object.
Define your CIDR ranges in a mapping table and then reference that using something like "CidrBlock": {"Fn::FindInMap": ["CIDRMap", "az"]},

But yeah, being able to reference values in the object that is being passed would be nice.

@nmccready nmccready changed the title Support objects in FN::Merge Support objects in FN::Map Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants