3

When setting up my development environment I added only a 'Staging' Environment Purpose to my Topology type.

Now I like to update this Topology type and add 'Live' also as an Environment Purpose.

My current TopologyTypes looks like:

enter image description here

When I am trying to add the Live Environment Purpose with the following command:

Set-TtmCdTopologyType -Id IntranetStagingAndLive -EnvironmentPurposes Staging,Live

I get the following error:

Set-TtmCdTopologyType : Property 'EnvironmentPurposes' of the item of type 'CdTopologyTypeData' with id 'IntranetStagingAndLive' can not be updated, because item is used by item of type 'CdTopologyData' with id 'DevTopology'.
At line:1 char:1
+ Set-TtmCdTopologyType -Id IntranetStagingAndLive -EnvironmentPurposes Staging,Li ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Tridion.Topolog...logyTypeCommand:SetCdTopologyTypeCommand) [Set-TtmCdTopologyType], DataServiceException
    + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.SetCdTopologyTypeCommand

To be sure I unpublished all content published to the Target Type and removed the Business Process Type from the publication.

The description of the command doesn't say anything about that adding an Environment Purpose isn't possible:

enter image description here

2 Answers 2

4

I've not tried this, but what I think you'll need to do is:

  1. Create a new Topology Type that contains both of the purposes that you now need ('Staging' and 'Live') (e.g. Add-TtmCdTopologyType -Name NewIntranetStagingAndLive -EnvironmentPurposes @("Staging", "Live"))
  2. Update the existing Topology to use this new Topology Type and specify the CD Environment for each of the purposes (e.g. Set-TtmCdTopology -Id DevTopology -CdTopologyTypeId NewIntranetStagingAndLive -CdEnvironmentIds @("StagingEnvironmentId","LiveEnvironmentId"))
  3. Update the Business Process Type to use the new Topology Type too (setting the values for the new 'Live' purpose)
  4. Delete the old Topology Type (e.g. Remove-TtmCdTopologyType IntranetStagingAndLive)

As I say, I've not tested this but it's certainly what I'd recommend trying next.

6
  • It may be worth to call out how you have passed multiple values for Purposes and EnvironmentIds using @(). TopMan does give you relevant error message when the parameters are passed correctly.
    – Shiva
    Commented May 8, 2019 at 15:35
  • Indeed, you are effectively defining a new Topology Type (consisting of more CD Environments). That’s what you should do in TTM too: define the new Type, define new Topologies based on the new Type, define a new BPT and switch your Publications to use that one. Commented May 8, 2019 at 16:24
  • Ah, okay. So Peter will need to create a new Topology, rather than updating the existing one (step 2 in my list). Is that correct, @RickPannekoek? Commented May 9, 2019 at 14:11
  • That may be the easiest route, yes. Commented May 9, 2019 at 18:34
  • I resolved it by deleting all needed related configuration (so I also had to remove the Ttm Environment) and create it again, but your solution sounds a little bit faster. But the answer is that it is not possible to 'update' and existing Topology. Commented May 13, 2019 at 6:14
3

The error says that you cannot change a Topology Type if you already have Topologies of that Type (regardless if you published items or not).

If you delete the Topology with ID ‘DevTopology’ (and any other Topology using that Topology Type), you should be able to change the Topology Type.

In general, if you change a Topology Type, you are effectively defining a new one and therefore it is best to create a new Topology Type next to the existing one.

2
  • But because that Topology is also in use by the TtmEnvironments it is not possible to delete that Topology right away.I resolved it by deleting all dependendt configurations and create the Topology(type) again. Commented May 13, 2019 at 6:15
  • What does “the Topology is in use by the TtmEnvironments” mean, exactly? AFAIK, a Topology uses CD Environments (and a single CD Environment can be used in multiple Topologies), not vice versa. Commented May 13, 2019 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.