User Tools

Site Tools


cloud:aws:cloudformation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cloud:aws:cloudformation [2023/12/05 15:01] skipidarcloud:aws:cloudformation [2023/12/05 15:02] (current) skipidar
Line 73: Line 73:
  
  
 +parent1.cloudformation.yaml
 <sxh yaml> <sxh yaml>
 +AWSTemplateFormatVersion: "2010-09-09"
 +Description: Provision a SG
  
-</sxh>+Parameters:
  
 +  VpcIdParameter:
 +    Type: String
 +    Default: "vpc-01eb7fd6f29cea57b"
 +    
 +  packageBucket:
 +    Type: String
 +    Default: "my-alf-s3-package-bucket-2023-12-05"
  
 +Resources:
 +
 +  SubStack1:
 +    Type: AWS::CloudFormation::Stack
 +    Properties:
 +      TemplateURL: "substack.helloworld.cloudformation.yaml"
 +      Parameters:
 +        VpcId: !Ref VpcIdParameter
 +
 +</sxh>
 +
 +substack.helloworld.cloudformation.yaml
 <sxh yaml> <sxh yaml>
 +AWSTemplateFormatVersion: "2010-09-09"
 +Description: Provision a SG
 +
 +Parameters:
 +  VpcId:
 +    Type: String
 +
 +
 +Resources:
 +
 +  MySecurityGroup:
 +    Type: AWS::EC2::SecurityGroup
 +    Properties:
 +      GroupDescription: MySecurityGroup
 +      VpcId: !Ref VpcId
 +      SecurityGroupIngress:
 +        - IpProtocol: tcp
 +          FromPort: 80
 +          ToPort: 80
 +          CidrIp: 0.0.0.0/0 # Example: Allowing HTTP traffic from anywhere (Please adjust for your use case)
 +      Tags:
 +        - Key: Name
 +          Value: MySecurityGroup
  
 </sxh> </sxh>
cloud/aws/cloudformation.1701788463.txt.gz · Last modified: by skipidar