great-sunset-355
07/23/2021, 9:45 AMpulumi config cp --stack staging --dest <owner>/dest-proj/staging
I get error: [400] Message authentication failed
brave-planet-10645
07/23/2021, 9:53 AMgreat-sunset-355
07/23/2021, 10:09 AMpulumi config refresh
in old project
however now the command can pass without any resultpulumi
command is run from
in my current structure
new_proj/
old_proj/
__main__.py
__main__.py
commands:
cd new_proj
pulumi config --show-secrets # empty as expected
cd old_proj
pulumi config --show-secrets # returns values
cd .. # back to new_proj
pulumi config --show-secrets -C old_proj # error 400 auth failed
pulumi config refresh -C old_proj
pulumi config --show-secrets -C old_proj # returns values
however none of the commands above helped to resolve the issue with copying the config:
cd new_proj
pulumi config cp --dest owner/new_proj/staging -C old_proj
also -v 3
does not give any debug logowner/project/stack
however on the website there is one more box stx/tqs-backend
is the repository - does this play any role in the naming? what would be the actual name of the project and stack inside?
I have a project called old_project
there with stack staging
Is the fully qualified name: owner/old_project/staging
or is it owner/stx/tqs-backend/old_project/staging
?
Or something completely different because some other projects are created directly in my namespacefrom pulumi import automation as auto
owner = 'owner'
new_project_name = "new_proj"
new_stack_name = f"{new_project_name}/staging"
old_project_name = "old_proj"
old_stack_name = f"{old_project_name}/staging"
new_stack = auto.select_stack(
stack_name=f"{owner}/{new_stack_name}", project_name=new_project_name, program=lambda: ""
)
old_stack = auto.select_stack(
stack_name=f"{owner}/{old_stack_name}", project_name="does not matter", program=lambda: ""
)
old_stack.refresh_config()
# update project config namespace
new_config = {k.replace(f"{old_project_name}:", f"{new_project_name}:"): v for k, v in old_stack.get_all_config().items()}
new_stack.set_all_config(new_config)
# update new stack
new_stack.up()