Using the `Octopus.Client` to modify a Kube Deployment Target that uses an AWS AssumedRoleArn & other properties
IsaacCalligeros95 opened this issue · comments
Isaac Calligeros commented
Customer is using the Octopus.Client to modify a Kube Deployment Target that uses an AWS role and is getting an error about the Account: NotSpecified: Exception calling "Modify" with "1" argument(s): "There was a problem with your request. 22:35:44 Error | - Account or certificate must be defined. 22:35:44 Error | - Account id must be defined.
Reproduction via running a PowerShell script
Add-Type -Path 'C:\Program Files\PackageManagement\NuGet\Packages\Octopus.Client.14.3.530\lib\net462\Octopus.Client.dll'
$server = "https://octo.domain.local/"
$apiKey = "API-1234"; # Get this from your 'profile' page in the Octopus Web Portal
$endpoint = New-Object Octopus.Client.OctopusServerEndpoint($server, $apiKey)
$repository = New-Object Octopus.Client.OctopusRepository($endpoint)
$machine = $repository.Machines.Get("machines-101");
$machine.Name = "Test";
$machine.Endpoint.ClusterUrl = "https://test.com/"
$machine.Endpoint.ClusterCertificate = "Certificates-1"
$machine = $repository.Machines.Modify($machine)
Note copied machine is missing AWS EKS-specific properties.
[sc-45408]
🔐 - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1680485988485459