in internal/aws/cfn/mock.go [176:228]
func GetChangeSet(stackName, changeSetName string) (*cloudformation.DescribeChangeSetOutput, error) {
c, ok := region().changeSets[changeSetName]
if !ok {
return nil, noChangeSetErr
}
if c.stackName != stackName {
return nil, fmt.Errorf("Mock change set's stack name is not '%s'", stackName)
}
return &cloudformation.DescribeChangeSetOutput{
Capabilities: []types.Capability{},
ChangeSetId: ptr.String(changeSetName),
ChangeSetName: ptr.String(changeSetName),
Changes: []types.Change{
{
ResourceChange: &types.ResourceChange{
Action: types.ChangeActionAdd,
Details: []types.ResourceChangeDetail{
{
CausingEntity: ptr.String("mock entity"),
ChangeSource: types.ChangeSourceResourceAttribute,
Evaluation: types.EvaluationTypeDynamic,
Target: &types.ResourceTargetDefinition{
Attribute: types.ResourceAttributeProperties,
Name: ptr.String("mock attribute"),
RequiresRecreation: types.RequiresRecreationNever,
},
},
},
LogicalResourceId: ptr.String("MockResourceId"),
PhysicalResourceId: ptr.String("MockPhysicalId"),
Replacement: types.ReplacementFalse,
ResourceType: ptr.String("Mock::Resource::Type"),
Scope: []types.ResourceAttribute{},
},
Type: types.ChangeTypeResource,
},
},
CreationTime: &now,
Description: ptr.String("Mock change set"),
ExecutionStatus: types.ExecutionStatusAvailable,
NextToken: nil,
NotificationARNs: []string{},
Parameters: c.params,
RollbackConfiguration: &types.RollbackConfiguration{},
StackId: ptr.String(stackName),
StackName: ptr.String(stackName),
Status: types.ChangeSetStatusCreateComplete,
StatusReason: ptr.String("Mock status reason"),
Tags: makeTags(c.tags),
}, nil
}