-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a project tag in sliderule-base.pkr.hcl to capture costs for the prov-sys #297
Comments
@cugarteblair - I went to add the project tag to the packer file, and I realized that there is no concept of a cluster for the packer build. We use the same AMI across all cluster and all types of instances. I think we want to keep it that way because it greatly simplifies managing it. Also, for security reasons, we never want to go back to an old AMI, or use anything other than the latest. |
JP,It seems to me that the AMI and project tag are independent issues. Correct?Carlos CarlosOn Aug 22, 2023, at 7:50 AM, JP Swinski ***@***.***> wrote:
@cugarteblair - I went to add the project tag to the packer file, and I realized that there is no concept of a cluster for the packer build. We use the same AMI across all cluster and all types of instances. I think we want to keep it that way because it greatly simplifies managing it. Also, for security reasons, we never want to go back to an old AMI, or use anything other than the latest.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Is the issue that the packer is built independent of instantiating the EC2? |
Yes, that's right. We maintain only three AMI's: "v3", "latest", and "unstable". In practice, v3 and latest are the only ones I keep up-to-date. We don't keep fully specified versions or old versions, because as soon as an AMI needs to be updated, it has to be updated across the board for every cluster. |
from chatgpt... The To ensure that the tags defined in the Here's how you can modify the resource "aws_autoscaling_group" "sliderule-cluster" {
# ... (other properties)
tag {
key = "Name"
value = "${var.cluster_name}-node"
propagate_at_launch = true
}
tag {
key = "Owner"
value = "SlideRule"
propagate_at_launch = true
}
tag {
key = "Project"
value = "cluster-${var.cluster_name}"
propagate_at_launch = true
}
tag {
key = "terraform-base-path"
value = replace(path.cwd, "/^.*?(${local.terraform-git-repo}\\/)/", "$1")
propagate_at_launch = true
}
tag {
key = "cost-grouping"
value = "${var.cluster_name}"
propagate_at_launch = true
}
} This will ensure that the tags you've defined in the |
Add a project tag to capture costs for the prov-sys #297
inside the default_tags. tags= section
Project = "cluster-${var.cluster_name}"
`locals {
terraform-git-repo = "sliderule-cluster"
}
provider "aws" {
region = var.aws_region
default_tags {
tags = {
Owner = "SlideRule"
Project = "cluster-${var.cluster_name}"
terraform-base-path = replace(path.cwd,
"/^.*?(${local.terraform-git-repo}\/)/", "$1")
cost-grouping = "${var.cluster_name}"
}
}
}`
The text was updated successfully, but these errors were encountered: