diff --git a/agent/config/config.go b/agent/config/config.go index 6b8ba113a5..7ae14fcdd0 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -319,7 +319,7 @@ type ServiceDefinition struct { Name *string `json:"name,omitempty" hcl:"name" mapstructure:"name"` Tags []string `json:"tags,omitempty" hcl:"tags" mapstructure:"tags"` Address *string `json:"address,omitempty" hcl:"address" mapstructure:"address"` - Meta map[string]string `json:"node_meta,omitempty" hcl:"meta" mapstructure:"meta"` + Meta map[string]string `json:"meta,omitempty" hcl:"meta" mapstructure:"meta"` Port *int `json:"port,omitempty" hcl:"port" mapstructure:"port"` Check *CheckDefinition `json:"check,omitempty" hcl:"check" mapstructure:"check"` Checks []CheckDefinition `json:"checks,omitempty" hcl:"checks" mapstructure:"checks"` diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 653490d258..f13bc77737 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -2438,6 +2438,9 @@ func TestFullConfig(t *testing.T) { "service": { "id": "dLOXpSCI", "name": "o1ynPkp0", + "meta": { + "mymeta": "data" + }, "tags": ["nkwshvM5", "NTDWn3ek"], "address": "cOlSOhbp", "token": "msy7iWER", @@ -2875,6 +2878,9 @@ func TestFullConfig(t *testing.T) { service = { id = "dLOXpSCI" name = "o1ynPkp0" + meta = { + mymeta = "data" + } tags = ["nkwshvM5", "NTDWn3ek"] address = "cOlSOhbp" token = "msy7iWER" @@ -3528,6 +3534,7 @@ func TestFullConfig(t *testing.T) { Tags: []string{"nkwshvM5", "NTDWn3ek"}, Address: "cOlSOhbp", Token: "msy7iWER", + Meta: map[string]string{"mymeta": "data"}, Port: 24237, EnableTagOverride: true, Checks: structs.CheckTypes{