Marat Bakeev
07/12/2024, 2:05 AM- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.7
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
Another issue is - even with all of this added, lookups do not work from github actions. The lookup returns nothing.
Error: reading IAM Instance Profile (<no value>): operation error IAM: GetInstanceProfile, https response error StatusCode: 400, RequestID: d0ab23da-fb09-4a7e-a5b8-3a34b24bdc77, api error ValidationError: 1 validation error detected: Value '<no value>' at 'instanceProfileName' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w+=,.@-]+
The lookup looks like this:
instance_profile: '{{ (atmos.Component "iam-role/azure-agent" .stack).outputs.role.instance_profile }}'
This same code works fine locally in geodesic shell!
if I run atmos terraform output iam-role/azure-agent --stack core-apse2-auto
I can see the output I'm looking up is there:
Terraform has been successfully initialized!
role = {
"arn" = "arn:aws:iam::BOGUS:role/nsp-core-apse2-auto-azure-agent"
"id" = "AROABOGUS6SEEH3A63"
"instance_profile" = "nsp-core-apse2-auto-azure-agent"
"name" = "nsp-core-apse2-auto-azure-agent"
"policy" = ""
}
and local atmos picks it up
atmos terraform plan ec2-instance/agent1 --stack core-apse2-autoErik Osterman (Cloud Posse)
07/12/2024, 12:10 PMErik Osterman (Cloud Posse)
07/12/2024, 12:12 PMErik Osterman (Cloud Posse)
07/12/2024, 2:33 PMIgor Rodionov
07/12/2024, 2:34 PM*atmos-terraform-drift-detection.yaml* so I will see where you added the steps.
ThanksErik Osterman (Cloud Posse)
07/12/2024, 2:35 PMatmos.Component not working in the action, did you set vars.ATMOS_VERSION to the latest version?
atmos-version: ${{ vars.ATMOS_VERSION }}Andriy Knysh (Cloud Posse)
07/12/2024, 2:56 PM<no value> is a result from Go templates if it was not evaluated. Something is not configured in the GH action: atmos.yaml , Atmos version, etc. Since it's working locally (both components iam-role/azure-agent and ec2-instance/agent1), then someting is missing in the action config (that can be Atmos version, or path to atmos.yaml, or config inside atmos.yaml)Dan Miller (Cloud Posse)
07/12/2024, 5:31 PMJeremy G (Cloud Posse)
07/12/2024, 7:58 PMazure appearing in strings here. I have no experience with Azure and I don't know how much, if at all, our stuff has been tested with Azure. While we would like to be cloud agnostic, our stuff has been focused on AWS.
I'm not exactly sure what you have. While I check on that, you should be getting Terraform installed for you. That gets configured in rootfs/usr/local/etc/atmos/atmos.yaml like this:
integrations:
github:
gitops:
terraform-version: 1.5.7
As for Node, we have gone through some iterations about which image to use for our self-hosted runners. Most people want to preserve the option to use containers in their workflows, so although if you don't need it, it is more efficient to not have it, we have decided to generally recommend enabling Docker-in-Docker for runners.
Additionally, while it is general Cloud Posse policy to use explicit version pinning on resources like Docker images, for runners, it is counter productive, because the first thing the runner does when it starts up is check to see if an update is available, and if one its, it installs it and then restarts. So having an explicit pin does not achieve the goal of pinning which version is actually run, and adds extra workload by forcing auto updates.
Putting the above together, we now recommend your runner use the following configuration snippet:
dind_enabled: true
image: <http://ghcr.io/actions-runner-controller/actions-runner-controller/actions-runner-dind:ubuntu-20.04|ghcr.io/actions-runner-controller/actions-runner-controller/actions-runner-dind:ubuntu-20.04>
I believe we sent you a configuration that uses the default image, which is now based on Ubuntu 22.04, and I think that explains the issues you were having with Node.
If you are sure you never need Docker in your runners, you can use
dind_enabled: false
image: <http://ghcr.io/actions-runner-controller/actions-runner-controller/actions-runner:ubuntu-20.04|ghcr.io/actions-runner-controller/actions-runner-controller/actions-runner:ubuntu-20.04>
Also, I recommend upgrading eks/actions-runner-controller to version 1.470.1Erik Osterman (Cloud Posse)
07/15/2024, 3:49 PM