#refarch (2023-11)

Cloud Posse Reference Architecture

2023-11-06

Michael Dizon avatar
Michael Dizon

i’ve used the dns-delegated component to launch a hosted zone in one of my workload accounts (prod), but I’m not sure how to create dns records in the subdomain (service.prod.example.net). am i supposed to deploy dns-primary in the prod account in addition to the dns account?

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

we typically will have another component or service add records to the hosted zone once created. So for example, say that you’ve created [prod.example.net](http://prod.example.net) with dns-delegated and you might have external-dns deployed. Then if you add an annotation to the “service” app in your cluster, external-dns will add/update the dns record to the hosted zone for you

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)
external-dns | The Cloud Posse Developer Hub

This component creates a Helm deployment for external-dns on a Kubernetes cluster. external-dns is a Kubernetes addon that configures public DNS servers with information about exposed Kubernetes services to make them discoverable.

2023-11-08

2023-11-21

johncblandii avatar
johncblandii
1
johncblandii avatar
johncblandii
╷
│ Error: Reference to undeclared local value
│ 
│   on iam.tf line 28, in locals:
│   28:   role_arn_template = module.account_map.outputs.iam_role_arn_templates[local.identity_account_name]
│ 
│ A local value with the name "identity_account_name" has not been declared.
Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

oh man yes it does. thanks for pointing that out. Will fix right now

1
johncblandii avatar
johncblandii

np…our workers are down so started investigating

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)
#912 Return `local.identity_account_name` for `spacelift/worker-pool`

what

• Added back local definition for local.identity_account_name for the spacelift/worker-pool component

why

• This value is used in the [iam.tf](http://iam.tf) policy • Only local.identity_account_id should have been removed, not local.identity_account_name

references

https://sweetops.slack.com/archives/C04NBF4JYJV/p1700604335106819

1
johncblandii avatar
johncblandii

@Dan Miller (Cloud Posse) semi-related: https://github.com/cloudposse/terraform-aws-components/blob/main/modules/spacelift/worker-pool/templates/user-data.sh#L6.

This is now breaking workers (see log):

  $(aws --region ${ecr_region} ecr get-login --registry-ids ${ecr_account_id} --no-include-email)
1
johncblandii avatar
johncblandii

Note these args are invalid as well:

 --registry-ids ${ecr_account_id} --no-include-email
  $(aws --region ${ecr_region} ecr get-login --registry-ids ${ecr_account_id} --no-include-email)
johncblandii avatar
johncblandii
cloud-init[1842]: Unknown options: --registry-ids,123456789,--no-include-email
Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

I noticed a similar issue and I just pinned a specific AMI until we have a chance to fix this

spacelift_ami_id: ami-05aae360ff018f5a0
Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

havent looked into it too much, but I suspect Spacelift changed what’s installed on their image

johncblandii avatar
johncblandii

yeah, must’ve upgraded their AWS CLI

johncblandii avatar
johncblandii

just using what is in our Makefile for non-geodesic commands.

$(aws --region ${ecr_region} ecr get-login-password | docker login --username AWS --password-stdin ${ecr_account_id})

…will report back how well it works

johncblandii avatar
johncblandii

ahh…forgot it needs the full domain:

$(aws --region ${ecr_region} ecr get-login-password | docker login --username AWS --password-stdin ${ecr_account_id}.dkr.ecr.us-east-1.amazonaws.com)
johncblandii avatar
johncblandii

back at it, but switched it up and this needs a credential helper so i’ll prob just punt on it and lock the AMI

1
johncblandii avatar
johncblandii

the above AMI wasn’t found. ended up just using this one: ami-05e8730417b8c3199

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

Ah yeah it’s likely regional

Hans D avatar

they’ve changed their ami / updated the underlying OS.

1
Hans D avatar

and yes, the very much outdated aws cli command used currently is the reason. @Dan Miller (Cloud Posse) you can peek in our repo to see how we fixed it currently

2023-11-22

Hans D avatar

When using the latest ami for the spacelift worker pool, things might get broken (see ^^^). Response from spacelift:
[…] you have a very good point about this being an unannounced breaking change. we’ll prepare an announcment today, and we’ll try to think about introducing semver into this process. sorry for the inconvenience.

2
    keyboard_arrow_up