On a previous upgrade the software-installers S3 b...
# fleet
e
On a previous upgrade the software-installers S3 bucket was deployed (as the default is set to create one). I don't actually need this, so I am aiming to update my terraform with:
Copy code
software_installers = {
      create_bucket = false
    }
However I am getting an index error on the terraform plan to destroy the bucket:
Copy code
│ Error: Invalid index
│ 
│   on .terraform/modules/fleet/terraform/byo-vpc/byo-db/byo-ecs/iam.tf line 14, in data "aws_iam_policy_document" "software_installers":
│   14:     resources = [aws_s3_bucket.software_installers[0].arn, "${aws_s3_bucket.software_installers[0].arn}/*"]
│     ├────────────────
│     │ aws_s3_bucket.software_installers is empty tuple
│ 
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵
╷
│ Error: Invalid index
│ 
│   on .terraform/modules/fleet/terraform/byo-vpc/byo-db/byo-ecs/iam.tf line 14, in data "aws_iam_policy_document" "software_installers":
│   14:     resources = [aws_s3_bucket.software_installers[0].arn, "${aws_s3_bucket.software_installers[0].arn}/*"]
│     ├────────────────
│     │ aws_s3_bucket.software_installers is empty tuple
│ 
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
Anyone able to support/debug here? I just want to remove the bucket.
h
hey @Ed Merrett - what tf file are you updating this value on?
e
Hey @Harrison my
fleet.tf
file that declares the fleet_configuration using the fleet module
Copy code
module "fleet" {
  source          = "<http://github.com/fleetdm/fleet//terraform?depth=1&ref=fleet-v4.57.1|github.com/fleetdm/fleet//terraform?depth=1&ref=fleet-v4.57.1>"
  certificate_arn = data.aws_acm_certificate.fleet_cert.arn

  fleet_config = {
    image = "fleetdm/fleet:v4.55.1"
    # See <https://fleetdm.com/docs/deploy/reference-architectures#aws>
    autoscaling = {
      min_capacity = 1
      max_capacity = 2
...
and so on
@Harrison any ideas on this?
h
Confirming something on my side with a test, should have something for ya shortly
Going to DM ya