sparse-intern-71089
05/24/2021, 3:31 PMbored-oyster-3147
05/24/2021, 3:41 PMOutput<string>.apply(v => "${v}"); would return Output<string>
The same way that:
Promise<string>.then(v => $"{v}"); returns Promise<string>
If you need to interpolate it into a string literal, then your literal needs to be part of the promise:
var result = proj.id.apply(id => "My project ID is ${id}"); now result is Output<string> and your proj.id has been interpolated and can be passed to an Input<string>tall-beard-99429
05/24/2021, 3:44 PMtall-beard-99429
05/24/2021, 3:44 PMnew gitlab.BranchProtection(`BranchProtection(${proj.id}:${project.defaultBranch})`, {...})tall-beard-99429
05/24/2021, 3:45 PMInput<string>bored-oyster-3147
05/24/2021, 3:47 PMbored-oyster-3147
05/24/2021, 3:47 PMtall-beard-99429
05/24/2021, 3:48 PMbored-oyster-3147
05/24/2021, 3:50 PMgitlab.Project, so why not {projectName}-branchprotection-{branchName}tall-beard-99429
05/24/2021, 3:51 PMtall-beard-99429
05/24/2021, 3:52 PMnew gitlab.Project()tall-beard-99429
05/24/2021, 3:52 PMbored-oyster-3147
05/24/2021, 3:52 PMnew gitlab.Project(name, ...) not be unique?bored-oyster-3147
05/24/2021, 3:52 PMtall-beard-99429
05/24/2021, 3:56 PMdelete or to at least run them first?tall-beard-99429
05/24/2021, 3:56 PMbored-oyster-3147
05/24/2021, 3:59 PMreplace action pulumi does create new, delete old but for some types of resources that have unique constraints that default behavior doesn't work so you set deleteBeforeReplace: true in the resource options which makes a replace action do delete current, create newbored-oyster-3147
05/24/2021, 4:00 PMbored-oyster-3147
05/24/2021, 4:01 PMdestroy first though since you are actually changing the pulumi names of theses resources so pulumi no longer sees them as the same entity and thus is doing the create and destroy separatelybored-oyster-3147
05/24/2021, 4:02 PMpulumi up so that it deletes them first since they are no longer declared - then uncomment them with the new namesbored-oyster-3147
05/24/2021, 4:03 PMtall-beard-99429
05/24/2021, 4:18 PMbored-oyster-3147
05/24/2021, 4:20 PMbored-oyster-3147
05/24/2021, 4:22 PM