File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 5454
5555 steps :
5656 - name : Create deploy-bucket
57- 57+ 5858 with :
5959 aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID_SANDBOX}}
6060 aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}
Original file line number Diff line number Diff line change 1111 else
1212 aws s3api create-bucket --bucket $TF_STATE_BUCKET --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true
1313 fi
14-
15- if ! [[ -z $( aws s3api head-bucket --bucket $TF_STATE_BUCKET 2>&1 ) ]]; then
16- echo " Bucket does not exist or permission is not there to use it ."
14+ touch bitovi-test-file.txt
15+ if ! [[ -z $( aws s3api put-object --bucket $TF_STATE_BUCKET --key bitovi-test-file.txt --body ./bitovi-test-file.txt 2>&1 > /dev/null ) ]]; then
16+ echo " Permission issue: Unable to write to the bucket ."
1717 exit 63
18+ else
19+ if ! [[ $( aws s3 rm " s3://$TF_STATE_BUCKET /bitovi-test-file.txt" 2>&1 > /dev/null ) ]]; then
20+ echo " Access to bucket confirmed. Can create and delete a tf-state file"
21+ fi
1822 fi
23+ rm bitovi-test-file.txt
1924fi
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ locals {
106106 GitHubOrgName = " ${ var . app_org_name } "
107107 GitHubRepoName = " ${ var . app_repo_name } "
108108 GitHubBranchName = " ${ var . app_branch_name } "
109- GitHubAction = " bitovi/github-actions-deploy-serverless-website "
109+ GitHubAction = " bitovi/github-actions-deploy-static-site-to-aws "
110110 created_with = " terraform"
111111 }
112112}
You can’t perform that action at this time.
0 commit comments