dry-journalist-60579
03/21/2023, 9:47 PMComponentResource
. When I rerun the stack, it doesn’t recognize it as an update and instead tries to recreate the resource. It fails because `creating IAM Role (AWSControlTowerAdmin): EntityAlreadyExists: Role with name AWSControlTowerAdmin already exists`… any thoughts on the correct approach to this?little-cartoon-10569
03/21/2023, 9:50 PMdry-journalist-60579
03/21/2023, 9:51 PMlittle-cartoon-10569
03/21/2023, 9:51 PMdry-journalist-60579
03/21/2023, 9:51 PMlittle-cartoon-10569
03/21/2023, 9:52 PMdelete: "true"
option.dry-journalist-60579
03/21/2023, 9:53 PMOur you could remove the resource from the state and import it in the new location^ how would this look?
little-cartoon-10569
03/21/2023, 9:53 PMpulumi state delete resourceUrn
pulumi import
or write the code yourself, and add the import:
opt.dry-journalist-60579
03/21/2023, 9:55 PMlittle-cartoon-10569
03/21/2023, 10:00 PMpulumi import
(unless it can handle that? Not sure...). You can write the code yourself and use the import
opt.dry-journalist-60579
03/21/2023, 10:01 PMlittle-cartoon-10569
03/21/2023, 10:01 PMdry-journalist-60579
03/21/2023, 10:02 PMlittle-cartoon-10569
03/21/2023, 10:02 PMdry-journalist-60579
03/21/2023, 10:03 PMlittle-cartoon-10569
03/21/2023, 10:03 PMdry-journalist-60579
03/21/2023, 10:04 PMlittle-cartoon-10569
03/21/2023, 10:13 PM.get()
class method (https://www.pulumi.com/registry/packages/aws/api-docs/iam/role/#look-up) to get a read-only version of the resource in the project you don't want to manage it.dry-journalist-60579
03/21/2023, 10:13 PMlittle-cartoon-10569
03/21/2023, 10:13 PMdry-journalist-60579
03/21/2023, 10:14 PMlittle-cartoon-10569
03/21/2023, 10:17 PMpulumi state delete
? Yes, that does not affect AWS, only the Pulumi state file.dry-journalist-60579
03/21/2023, 10:18 PMprotect
still applies to the statelittle-cartoon-10569
03/21/2023, 10:20 PMprotect
via an up (which will also do nothing to AWS), then remove the resource from state.dry-journalist-60579
03/21/2023, 10:30 PM