Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #66 from aws-quickstart/gargana_blog_assets
Browse files Browse the repository at this point in the history
Final changes for blog assets
  • Loading branch information
gargana authored Oct 27, 2022
2 parents b1cdf83 + 9c55e7a commit 782d101
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ Parameters:
AccessCIDR:
Default: 0.0.0.0/0
Type: String
KeyPairName:
Description: Name of an existing key pair, which allows you to securely connect to your bastion instance after it launches.
Leave empty to proceed without a key pair. You would need to use AWS Systems Manager Session Manager to connect to the provisioned EC2 instances.
Type: String
Default: ""
JobName:
Type: String
Default: 'example-job'
AvailabilityZones:
Description: List of Availability Zones to use for the subnets in the VPC. Three
Availability Zones are used for this deployment.
Type: List<AWS::EC2::AvailabilityZone::Name> AvailabilityZones:
Type: List<AWS::EC2::AvailabilityZone::Name>
NumberOfAZs:
Type: String
AllowedValues: ["2", "3"]
Expand All @@ -28,22 +33,22 @@ Resources:
Properties:
TemplateURL: 'https://aws-quickstart.s3.amazonaws.com/quickstart-amazon-eks/templates/amazon-eks-entrypoint-new-vpc.template.yaml'
Parameters:
# QuickStart properties
QSS3BucketName: aws-quickstart
QSS3KeyPrefix: quickstart-amazon-eks/
# Cluster properties
ProvisionBastionHost: Enabled
KeyPairName: !Ref KeyPairName
RemoteAccessCIDR: !Ref AccessCIDR
AvailabilityZones: !Join [ ',', !Ref 'AvailabilityZones' ]
NumberOfAZs: !Ref NumberOfAZs
NodeInstanceType: t3.large
NumberOfNodes: 1
MaxNumberOfNodes: 1
PreworkStack:
DependsOn: EKSStack
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://aws-quickstart.s3.amazonaws.com/quickstart-examples/blog-assets/eks-cluster-prework/templates/prework.template.yaml'
Parameters:
ClusterName: !Sub "EKSStack.Outputs.EKSClusterName"
ClusterName: !GetAtt "EKSStack.Outputs.EKSClusterName"
PreworkScriptBucket: !Ref PreworkScriptBucket
PreworkScriptObject: !Ref PreworkScriptObject
JobName: !Ref JobName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Parameters:
Default: aws-quickstart
PreworkScriptObject:
Type: String
Default: "quickstart-examples/samples/eks-cluster-prework/scripts/pw-script.sh"
Default: "quickstart-examples/blog-assets/eks-cluster-prework/scripts/pw-script.sh"
JobName:
Type: String
Default: example-job
Expand All @@ -32,12 +32,12 @@ Resources:
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/${GetOIDCProvider}"
"Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/${OIDCProvider}"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"${GetOIDCProvider}:sub": "system:serviceaccount:${NameSpace}:${ResourceName}"
"${OIDCProvider}:sub": "system:serviceaccount:${NameSpace}:${ResourceName}"
}
}
}
Expand Down Expand Up @@ -169,6 +169,7 @@ Resources:
sleep 15;
export AWS_REGION=${AWS::Region};
export NS=${NameSpace};
yum install -y aws-cli;
aws sts get-caller-identity;
aws s3 cp ${!S3_SCRIPT_URL} ./prework-script.sh &&
chmod +x ./prework-script.sh &&
Expand Down

0 comments on commit 782d101

Please sign in to comment.