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 54
54
55
55
steps :
56
56
- name : Create deploy-bucket
57
-
57
+
58
58
with :
59
59
aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID_SANDBOX}}
60
60
aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}
Original file line number Diff line number Diff line change 11
11
else
12
12
aws s3api create-bucket --bucket $TF_STATE_BUCKET --region $AWS_DEFAULT_REGION --create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION || true
13
13
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 ."
17
17
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
18
22
fi
23
+ rm bitovi-test-file.txt
19
24
fi
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ locals {
106
106
GitHubOrgName = " ${ var . app_org_name } "
107
107
GitHubRepoName = " ${ var . app_repo_name } "
108
108
GitHubBranchName = " ${ var . app_branch_name } "
109
- GitHubAction = " bitovi/github-actions-deploy-serverless-website "
109
+ GitHubAction = " bitovi/github-actions-deploy-static-site-to-aws "
110
110
created_with = " terraform"
111
111
}
112
112
}
You can’t perform that action at this time.
0 commit comments