Hi

I basically want to create a new security group on AWS and add a
permission to it.

Code snippet:
AWSEC2SecurityGroupExtension client =
(AWSEC2SecurityGroupExtension)compute.getSecurityGroupExtension().get();
SecurityGroup sg = client.createSecurityGroup("crossbuild", CLOUD_REGION);
Builder b = IpPermission.builder();
b.fromPort(0);
b.toPort(65535);
b.groupId(sg.getId());
b.ipProtocol(IpProtocol.TCP);
client.addIpPermission(b.build(), sg);

This throws "Invalid id: "eu-central-1/sg-56b6bb3f" (expecting
"sg-...")". So I tried to remove the region from id with

String gid = sg.getId().replaceFirst(CLOUD_REGION+"/", "");
b.groupId(gid);

but now it throws an exception saying that value for groupId must not be
empty which it is not.

An on top of that, security group name is not respected. Instead of a
group with name "crossbuild" I actually get "jclouds#crossbuild" which
is really confusing because now I need to use two different names when
creating the group and later using it by name in template builder.

The first issue I'm really stuck at, the second one is more of cosmetic
nature.


Best regards, Cen

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to