Skip to content

Panic when creating StackSet Instances #689

@asantos-fuze

Description

@asantos-fuze

I'm getting a panic when deploying CFn StackSet as SERVICE_MANAGED and callas: DELEGATED_ADMIN

DEBUG: Creating stack set
Stack set has been created successfuly with ID: stack-set-name:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DEBUG: ConfigData is valid

DEBUG: Stack Set Instances Configuration:
{
	"Regions": [
		"us-east-1"
	],
	"Accounts": null,
	"DeploymentTargets": {
		"AccountFilterType": "",
		"Accounts": null,
		"AccountsUrl": null,
		"OrganizationalUnitIds": [
			"r-xxxxxxxx"
		]
	},
	"OperationPreferences": null,
	"StackSetName": "stack-set-name",
	"CallAs": "DELEGATED_ADMIN"
}

DEBUG: Creating stack set instances
DEBUG: Create stack instances API result:
{
	"OperationId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
	"ResultMetadata": {}
}
Submitted CREATE instances operation with ID: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
panic: error while creating stack set instances: operation error CloudFormation: DescribeStackSetOperation, https response error StatusCode: 404, RequestID: zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz, StackSetNotFoundException: StackSet stack-set-name not found [recovered]
	panic: error while creating stack set instances: operation error CloudFormation: DescribeStackSetOperation, https response error StatusCode: 404, RequestID: zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz, StackSetNotFoundException: StackSet stack-set-name not found

goroutine 1 [running]:
github.com/aws-cloudformation/rain/internal/cmd.execute.func1()
	/__w/rain/rain/internal/cmd/wrap.go:77 +0x164
panic({0x10460e400?, 0x1400029b400?})
	/usr/local/go/src/runtime/panic.go:792 +0x124
github.com/aws-cloudformation/rain/internal/cmd/stackset.createStackSet({0x0, 0x14000443710, {0x0, 0x1400000c420, {0x1400041d750, 0xf}, {0x14000422d80, 0x2, 0x2}, 0x140004075b0, ...}, ...})
	/__w/rain/rain/internal/cmd/stackset/stackset_deploy.go:361 +0x56c
github.com/aws-cloudformation/rain/internal/cmd/stackset.init.func1(0x1400025b800?, {0x14000200210?, 0x2?, 0x103837510?})
	/__w/rain/rain/internal/cmd/stackset/stackset_deploy.go:144 +0x780
github.com/spf13/cobra.(*Command).execute(0x104e43640, {0x14000200160, 0xb, 0xb})
	/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0x810
github.com/spf13/cobra.(*Command).ExecuteC(0x104e3eec0)
	/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/aws-cloudformation/rain/internal/cmd.execute(0x68?)
	/__w/rain/rain/internal/cmd/wrap.go:86 +0x4c
github.com/aws-cloudformation/rain/internal/cmd.Execute(0x104dba3c8?)
	/__w/rain/rain/internal/cmd/wrap.go:95 +0x1c
main.main()
	/__w/rain/rain/cmd/rain/main.go:23 +0x24

I believe the issue happens because the StackSet is DELEGATED_ADMIN and no callas parameter is being passed on the function:

operation, err = getClient().DescribeStackSetOperation(context.Background(), &cloudformation.DescribeStackSetOperationInput{

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions