GSA-TTS / datagov-brokerpak-eks

Broker AWS EKS instances using the OSBAPI (eg from cloud.gov)
Other
9 stars 7 forks source link

Make using the GSA AMI optional with a variable #94

Closed loganmeetsworld closed 2 years ago

loganmeetsworld commented 2 years ago

Our AWS account does not yet have permission to pull the GSA hardened AMIs so we get an error when running the plan for this Terraform. When running with the variable created here set to false, we get a clean plan.

cc/ @mogul

loganmeetsworld commented 2 years ago

Is the error I'm getting related to the broker - do I need to define this in eks-service-definition.yml? Possibly need to define in main.tf as well 🤔

mogul commented 2 years ago

Correct. You don't have to expose it to users of the broker, but you need to reference it and set a default in the service manifest. Example here. And here's the relevant section of the manifest docs.

mogul commented 2 years ago

Possibly need to define in main.tf as well 🤔

Technically the broker is just mashing all the files in provision-aws and provision-k8s together when it makes the brokerpak, with no module boundaries, so you can just reference it directly.

However, if you want this var to be exposed in non-brokerpak use-cases where the modules are in play, you might want to add it up here and pass it as a module input.

mogul commented 2 years ago

(And: Sorry the broker YAML shenanigans are getting in the way of your very clean HCL contribution.)

nickumia-reisys commented 2 years ago

Now that I'm thinking about it, would it be better to make the GSA AMI optional? Or default to the Amazon AMI if the GSA AMI is unavailable? @loganmeetsworld @mogul

nickumia-reisys commented 2 years ago

Now that I'm thinking about it, would it be better to make the GSA AMI optional? Or default to the Amazon AMI if the GSA AMI is unavailable? @loganmeetsworld @mogul

nickumia-reisys commented 2 years ago

I gave up on my last comment, so I ended up just copying the changes here to #99. If everyone is okay with it, it can be approved at any time.