You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bin/terraform.sh
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
##
9
9
# Set Script Version
10
10
##
11
-
readonly script_ver='1.10.2';
11
+
readonly script_ver='2.0.0';
12
12
13
13
##
14
14
# Standardised failure function
@@ -438,7 +438,11 @@ declare tf_var_params;
438
438
439
439
if [ "${bootstrap}"=='true' ];then
440
440
if [ "${action}"=="destroy" ];then
441
-
error_and_die 'You cannot destroy a bootstrap bucket using tfscaffold, it's just too dangerous. If you're absolutely certain that you want to delete the bucket and all contents, including any possible state files environments and components within this project, then you will need to do it from the AWS Console. Note you cannot do this from the CLI because the bootstrap bucket is versioned, and even the --force CLI parameter will not empty the bucket of versions';
441
+
echo -en "\n#####################\n# ALERT ALERT ALERT #\n#####################\n\nDo you *really* want to destroy this bootstrap?\n\nPerforming this action will delete your WHOLE STATE BUCKET (${bucket}) AND ALL ITS CONTENTS FOR ALL ENVIRONMENTS.\nAny state files you have created as part of this tfscaffold project will be IRRECOVERABLY DELETED! Forever!\n\nAcknowledge by typing out this exact sentence, removing all + characters: \"I+am+not+an+idiot,+I+know+what+I+am+doing!\": ";
442
+
read destroy_response;
443
+
if [ "${destroy_response}"!='I am not an idiot, I know what I am doing!' ];then
444
+
error_and_die "ABORT ABORT ABORT!! YOU ARE AN IDIOT!!";
445
+
fi;
442
446
fi;
443
447
444
448
# Bootstrap requires this parameter as explicit as it is constructed here
@@ -668,14 +672,18 @@ if [ "${bootstrapped}" == 'true' ]; then
668
672
# Configure remote state storage
669
673
echo"Setting up S3 remote state from s3://${bucket}/${backend_key}";
670
674
[ "${lock_table}"=='true' ] &&echo"Using DynamoDB Table for state locking: ${bucket}";
|[aws_iam_policy_document.default_assumerole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
33
+
|[aws_iam_policy_document.kms_s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
34
+
|[aws_iam_policy_document.s3_main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
35
+
36
+
## Inputs
37
+
38
+
| Name | Description | Type | Default | Required |
| <aname="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id)| The AWS Account ID into which we are bootstrapping tfscaffold |`string`| n/a | yes |
41
+
| <aname="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name)| The name to use for the tfscaffold bucket. This should be provided from tfscaffold shell, not environment or group tfvars |`string`| n/a | yes |
42
+
| <aname="input_component"></a> [component](#input\_component)| The name of the component for the bootstrapping process; which is always bootstrap |`string`|`"bootstrap"`| no |
43
+
| <aname="input_environment"></a> [environment](#input\_environment)| The name of the environment for the bootstrapping process; which is always bootstrap |`string`|`"bootstrap"`| no |
44
+
| <aname="input_project"></a> [project](#input\_project)| The name of the Project we are bootstrapping tfscaffold for |`string`| n/a | yes |
45
+
| <aname="input_region"></a> [region](#input\_region)| The AWS Region into which we are bootstrapping tfscaffold |`string`| n/a | yes |
46
+
| <aname="input_tfscaffold_ro_principals"></a> [tfscaffold\_ro\_principals](#input\_tfscaffold\_ro\_principals)| A list of Principals permitted to ListBucket and GetObject for Remote State purposes. Normally the root principal of the account |`list(string)`|`[]`| no |
0 commit comments