Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (1.4k points)

I’m encountering an error as ‘Value of property CidrBlock must be of type String’, while I’m trying to get the CIDR block set by using the user in the Parameters, split the CIDR by "." to get individual numbers and join CIDR[0], CIDR[1], "4.0/24". The following function is used:

"CidrBlock": {

                "Join": [

                    ".",

                    [

                        {

                            "Select": [

                                "0",

                                {

                                    "Split": [

                                        ".",

                                        {

                                            "Ref": "2CIDR"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "Select": [

                                "1",

                                {

                                    "Split": [

                                        ".",

                                        {

                                            "Ref": "2CIDR"

                                        }

                                    ]

                                }

                            ]

                        },

                        "16.0/24"

                    ]

                ]

            },

I need to build the CIDR of each subnet using the CIDR of VPC and also may I know the issue with the above function? Kindly suggest me with any solutions.

1 Answer

0 votes
by (2.6k points)
edited by

"Fn::Join" is the function and “Join” is not  a function. I guess this might be the reason causing you the issue.

You can also learn about various AWS skills from Intellipaat's AWS Certification

To know more about aws vpc.

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...