Skip to content

Commit 3d63d89

Browse files
add chef aws tags (#8750)
* add chef aws tags Signed-off-by: Vivek Shankar <[email protected]> * cluster ctl deps add in automate deploymnt Signed-off-by: Vivek Shankar <[email protected]> --------- Signed-off-by: Vivek Shankar <[email protected]>
1 parent 13c4546 commit 3d63d89

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

components/automate-backend-deployment/habitat/plan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pkg_deps=(
2424
core/rsync/3.2.3/20240107034222
2525
core/terraform1/1.5.7/20240106055300
2626
core/busybox-static/1.34.1/20240105230035
27-
chef/automate-ha-cluster-ctl/0.1.0/20250109090656
27+
chef/automate-ha-cluster-ctl
2828
)
2929
#core/aws-cli ( core/aws-cli/1.21.11/20231020110846 core/aws-cli/1.21.11/20220817123642 )
3030
# core/openssl11 ( core/openssl11/1.1.1w/20231020105352 core/openssl11/1.1.1k/20220311131131 )

components/automate-cli/cmd/chef-automate/genA2haRbTmpl.go

+9
Original file line numberDiff line numberDiff line change
@@ -304,5 +304,14 @@ aws do
304304
### DEPRECATED: AWS Tag: Production flag - set true for production environment
305305
{{ if .Aws.Config.XProduction }} production "{{ .Aws.Config.XProduction }}" {{ else }} production "{{ .Aws.Config.XProduction }}" {{ end }}
306306
tags({"X-Contact"=>"{{ .Aws.Config.XContact }}", "X-Dept"=>"{{ .Aws.Config.XDept }}", "X-Project"=>"{{ .Aws.Config.XProject }}", "X-Customer"=>"{{ .Aws.Config.XCustomer }}", "X-Production"=>"{{ .Aws.Config.XProduction }}"})
307+
308+
### DEPRECATED: Below tags are used for CHEF AWS infrastructure tagging
309+
{{ if .Aws.Config.XEphemeral }} ephemeral "{{ .Aws.Config.XEphemeral }}" {{ else }} # ephemeral "{{ .Aws.Config.XEphemeral }}" {{ end }}
310+
{{ if .Aws.Config.XTeam }} team "{{ .Aws.Config.XTeam }}" {{ else }} # team "{{ .Aws.Config.XTeam }}" {{ end }}
311+
{{ if .Aws.Config.XOwner }} owner "{{ .Aws.Config.XOwner }}" {{ else }} # owner "{{ .Aws.Config.XOwner }}" {{ end }}
312+
{{ if .Aws.Config.XApplication }} application "{{ .Aws.Config.XApplication }}" {{ else }} # application "{{ .Aws.Config.XApplication }}" {{ end }}
313+
{{ if .Aws.Config.XSolutions }} solutions "{{ .Aws.Config.XSolutions }}" {{ else }} # solutions "{{ .Aws.Config.XSolutions }}" {{ end }}
314+
{{ if .Aws.Config.XName }} Name "{{ .Aws.Config.XName }}" {{ else }} # Name "{{ .Aws.Config.XName }}" {{ end }}
315+
{{ if .Aws.Config.XExpiration }} expiration "{{ .Aws.Config.XExpiration }}" {{ else }} # expiration "{{ .Aws.Config.XExpiration }}" {{ end }}
307316
end
308317
`

components/automate-cli/cmd/chef-automate/initConfigHa.go

+7
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ type ConfigToml struct {
101101
XProject string `toml:"X-Project"`
102102
XProduction string `toml:"X-Production"`
103103
XCustomer string `toml:"X-Customer"`
104+
XEphemeral string `toml:"ephemeral"`
105+
XTeam string `toml:"team"`
106+
XOwner string `toml:"owner"`
107+
XApplication string `toml:"application"`
108+
XSolutions string `toml:"solutions"`
109+
XName string `toml:"Name"`
110+
XExpiration string `toml:"expiration"`
104111
AwsAutomateRoute53Prefix string `toml:"aws_automate_route53_prefix"`
105112
AwsChefServerRoute53Prefix string `toml:"aws_chef_server_route53_prefix"`
106113
AwsRoute53HostedZone string `toml:"aws_route53_hosted_zone"`

components/automate-cluster-ctl/lib/cluster/config.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,14 @@ def self.restore_deploy_symlink(path)
210210
{
211211
"X-Contact" => configuration[:contact],
212212
"X-Dept" => configuration[:dept],
213-
"X-Project" => configuration[:project]
213+
"X-Project" => configuration[:project],
214+
"ephemeral" => configuration[:ephemeral],
215+
"team" => configuration[:team],
216+
"owner" => configuration[:owner],
217+
"application" => configuration[:application],
218+
"solutions" => configuration[:solutions],
219+
"Name" => configuration[:Name],
220+
"expiration" => configuration[:expiration],
214221
}
215222
end
216223
end

0 commit comments

Comments
 (0)