mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 15:21:05 -05:00
AWS::IAM::InstanceProfile rejected any createOnly change on UpdateStack (a name or Path change threw ValidationError). Both InstanceProfileName and Path are createOnly, so a change should replace the profile. - A rename creates the new profile under the new name; dropping the explicit name mints a generated one; a Path change on an auto-named profile mints a fresh name so the replacement does not collide with the profile it displaces. The old profile is deleted once the update commits, or restored on rollback, via ReplacementCleanup, the same path Ec2Instance uses. - Whether the profile was created under an explicit name is recorded at create time in a __Floci attribute (filtered from the published ones), not inferred from the id's shape: a generated name loses its <stack>-<logicalId> prefix past 128 characters, so a shape check would have replaced every auto-named profile of a long-named stack on each update. A prior profile with no record is kept. - A Path change that keeps an explicit name is attempted with that same name, so CreateInstanceProfile collides and IAM answers EntityAlreadyExists, exactly as CloudFormation surfaces that update, rather than being rejected up front.