mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* feat(cloudformation): provision Cloud Map namespaces and services AWS::ServiceDiscovery::PrivateDnsNamespace, PublicDnsNamespace, HttpNamespace and Service were stubbed, so a stack reported them created while nothing existed in Cloud Map and Fn::GetAtt resolved to literals. CloudMapCfnProvisioner creates them through CloudMapService. Ref returns the id; Fn::GetAtt exposes Id and Arn, HostedZoneId on a DNS namespace and Name on a service. An unnamed service is named <LogicalId>-<12 chars>, as measured on AWS. Description, DnsConfig, HealthCheckConfig and Tags update in place; a createOnly change replaces the resource through ReplacementCleanup, and a rolled-back replacement restores the createOnly record. A Ref to a Number parameter is coerced back to a JSON number for DnsRecords TTL and FailureThreshold. Closes #4596 * fix(cloudformation): roll back in-place Cloud Map updates An in-place namespace or service update followed by a later resource failing left the Cloud Map changes live and the stack in UPDATE_ROLLBACK_FAILED, since rollbackUpdate only undid replacements. The provisioner now keeps the description, DnsConfig, HealthCheckConfig and tags an in-place update overwrites and puts them back on rollback; a committed update drops the snapshot. * fix(cloudmap): reject DNS record type changes on service update UpdateService only changes the TTLs of a service's existing DNS records on AWS. An in-place CloudFormation update that changes the record types, or gives a DnsConfig to a service without one, now fails with InvalidInput instead of being applied, so it rolls back like on AWS and a rollback never has to remove a DnsConfig. * fix(cloudmap): accept only TTL changes in a service DnsConfig update UpdateService carries only DnsRecords on AWS and CloudFormation does not support a RoutingPolicy update. Comparing the record types as a set let a RoutingPolicy change or an added record of the same type through; the requested and stored DnsConfig now have to match apart from the TTLs. * fix(cloudmap): ignore DNS record order in a service DnsConfig update A TTL-only update that listed the same records in another order was rejected. The comparison now uses the sorted record types, so counts, types and RoutingPolicy still have to match. * test(cloudformation): restore a real HealthCheckConfig in the Cloud Map rollback test The in-place rollback test went from a null health check config to null, so dropping it from the snapshot would have passed.