incalculable-portugal-13011
09/07/2020, 5:33 PMlet myFirstServiceRegistryService = new aws.servicediscovery.Service("myFirstFargateService", {
dnsConfig: {
namespaceId: nodeServiceDiscoveryNamespace.id,
dnsRecords: [{
ttl: 10,
type: "A"
}],
routingPolicy: "MULTIVALUE"
}
});
let myFirstFargateService = new awsx.ecs.FargateService("myFirstFargateService", {
...
serviceRegistries: {
registryArn: myServiceRegistry.arn,
containerName: myAppServiceRegistryService
}
});
let mySecondFargateService = new awsx.ecs.FargateService("mySecondFargateService", {
...
taskDefinitionArgs: {
containers: {
mySecondFargateService: {
environment: [{
name: "APP_HOSTNAME",
value: myAppFArgateService HOSTNAME GOES HERE
}]
}
}
}
});