Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed documents for missing crn #3130

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ibm/data_source_ibm_is_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ func dataSourceIBMISInstance() *schema.Resource {
Description: "The crn of the resource",
},

IsInstanceCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceStatus: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -786,6 +792,7 @@ func instanceGetByName(d *schema.ResourceData, meta interface{}, name string) er
d.Set(ResourceControllerURL, controller+"/vpc-ext/compute/vs")
d.Set(ResourceName, instance.Name)
d.Set(ResourceCRN, instance.CRN)
d.Set(IsInstanceCRN, instance.CRN)
d.Set(ResourceStatus, instance.Status)
if instance.ResourceGroup != nil {
d.Set(isInstanceResourceGroup, instance.ResourceGroup.ID)
Expand Down
6 changes: 6 additions & 0 deletions ibm/data_source_ibm_is_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ func dataSourceIBMISInstances() *schema.Resource {
Computed: true,
Description: "Instance name",
},
"crn": {
Type: schema.TypeString,
Computed: true,
Description: "The crn for this Instance",
},
"memory": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -595,6 +600,7 @@ func instancesList(d *schema.ResourceData, meta interface{}) error {
id := *instance.ID
l := map[string]interface{}{}
l["id"] = id
l["crn"] = *instance.CRN
l["name"] = *instance.Name
l["memory"] = *instance.Memory
l["status"] = *instance.Status
Expand Down
7 changes: 7 additions & 0 deletions ibm/data_source_ibm_is_public_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ func dataSourceIBMISPublicGateway() *schema.Resource {
Description: "The name of the resource",
},

isPublicGatewayCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceCRN: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -152,6 +158,7 @@ func dataSourceIBMISPublicGatewayRead(d *schema.ResourceData, meta interface{})
d.Set(ResourceControllerURL, controller+"/vpc-ext/network/publicGateways")
d.Set(ResourceName, *publicgw.Name)
d.Set(ResourceCRN, *publicgw.CRN)
d.Set(isPublicGatewayCRN, *publicgw.CRN)
d.Set(ResourceStatus, *publicgw.Status)
if publicgw.ResourceGroup != nil {
d.Set(isPublicGatewayResourceGroup, *publicgw.ResourceGroup.ID)
Expand Down
13 changes: 10 additions & 3 deletions ibm/data_source_ibm_is_public_gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func dataSourceIBMISPublicGateways() *schema.Resource {
Description: "The name of the resource",
},

isPublicGatewayCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceCRN: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -160,9 +166,10 @@ func publicGatewaysGet(d *schema.ResourceData, meta interface{}, name string) er
isPublicGatewayZone: *publicgw.Zone.Name,
isPublicGatewayVPC: *publicgw.VPC.ID,

ResourceName: *publicgw.Name,
ResourceCRN: *publicgw.CRN,
ResourceStatus: *publicgw.Status,
ResourceName: *publicgw.Name,
isPublicGatewayCRN: *publicgw.CRN,
ResourceCRN: *publicgw.CRN,
ResourceStatus: *publicgw.Status,
}
if publicgw.FloatingIP != nil {
floatIP := map[string]interface{}{
Expand Down
7 changes: 7 additions & 0 deletions ibm/data_source_ibm_is_ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ func dataSourceIBMISSSHKey() *schema.Resource {
Description: "The crn of the resource",
},

IsKeyCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceGroupName: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -133,6 +139,7 @@ func keyGetByName(d *schema.ResourceData, meta interface{}, name string) error {
d.Set(ResourceControllerURL, controller+"/vpc/compute/sshKeys")
d.Set(ResourceName, *key.Name)
d.Set(ResourceCRN, *key.CRN)
d.Set(IsKeyCRN, *key.CRN)
if key.ResourceGroup != nil {
d.Set(ResourceGroupName, *key.ResourceGroup.ID)
}
Expand Down
8 changes: 8 additions & 0 deletions ibm/resource_ibm_is_floating_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

const (
isFloatingIPAddress = "address"
isFloatingIPCRN = "crn"
isFloatingIPName = "name"
isFloatingIPStatus = "status"
isFloatingIPZone = "zone"
Expand Down Expand Up @@ -142,6 +143,12 @@ func resourceIBMISFloatingIP() *schema.Resource {
Description: "The crn of the resource",
},

isFloatingIPCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceStatus: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -307,6 +314,7 @@ func fipGet(d *schema.ResourceData, meta interface{}, id string) error {
}
d.Set(ResourceControllerURL, controller+"/vpc-ext/network/floatingIPs")
d.Set(ResourceName, *floatingip.Name)
d.Set(isFloatingIPCRN, *floatingip.CRN)
d.Set(ResourceCRN, *floatingip.CRN)
d.Set(ResourceStatus, *floatingip.Status)
if floatingip.ResourceGroup != nil {
Expand Down
8 changes: 8 additions & 0 deletions ibm/resource_ibm_is_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
isImageEncryptionKey = "encryption_key"
isImageEncryption = "encryption"
isImageCheckSum = "checksum"
IsImageCRN = "crn"

isImageProvisioning = "provisioning"
isImageProvisioningDone = "done"
Expand Down Expand Up @@ -172,6 +173,12 @@ func resourceIBMISImage() *schema.Resource {
Description: "The crn of the resource",
},

IsImageCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

isImageCheckSum: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -548,6 +555,7 @@ func imgGet(d *schema.ResourceData, meta interface{}, id string) error {
d.Set(ResourceName, *image.Name)
d.Set(ResourceStatus, *image.Status)
d.Set(ResourceCRN, *image.CRN)
d.Set(IsImageCRN, *image.CRN)
if image.ResourceGroup != nil {
d.Set(isImageResourceGroup, *image.ResourceGroup.ID)
}
Expand Down
7 changes: 7 additions & 0 deletions ibm/resource_ibm_is_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

const (
isInstanceName = "name"
IsInstanceCRN = "crn"
isInstanceKeys = "keys"
isInstanceTags = "tags"
isInstanceNetworkInterfaces = "network_interfaces"
Expand Down Expand Up @@ -157,6 +158,11 @@ func resourceIBMISInstance() *schema.Resource {
Computed: true,
Description: "VPC id",
},
IsInstanceCRN: {
Type: schema.TypeString,
Computed: true,
Description: "Crn for this Instance",
},

isInstanceSourceTemplate: {
Type: schema.TypeString,
Expand Down Expand Up @@ -1639,6 +1645,7 @@ func instanceGet(d *schema.ResourceData, meta interface{}, id string) error {
d.Set(ResourceControllerURL, controller+"/vpc-ext/compute/vs")
d.Set(ResourceName, *instance.Name)
d.Set(ResourceCRN, *instance.CRN)
d.Set(IsInstanceCRN, *instance.CRN)
d.Set(ResourceStatus, *instance.Status)
if instance.ResourceGroup != nil {
d.Set(isInstanceResourceGroup, *instance.ResourceGroup.ID)
Expand Down
6 changes: 6 additions & 0 deletions ibm/resource_ibm_is_instance_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ func resourceIBMISInstanceTemplate() *schema.Resource {
Description: "User data given for the instance",
},

isInstanceTemplateCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The CRN for the instance",
},

isInstanceTemplateImage: {
Type: schema.TypeString,
ForceNew: true,
Expand Down
10 changes: 8 additions & 2 deletions ibm/resource_ibm_is_public_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const (
isPublicGatewayProvisioningDone = "available"
isPublicGatewayDeleting = "deleting"
isPublicGatewayDeleted = "done"

isPublicGatewayResourceGroup = "resource_group"
isPublicGatewayCRN = "crn"
isPublicGatewayResourceGroup = "resource_group"
)

func resourceIBMISPublicGateway() *schema.Resource {
Expand Down Expand Up @@ -123,6 +123,11 @@ func resourceIBMISPublicGateway() *schema.Resource {
Computed: true,
Description: "The crn of the resource",
},
isPublicGatewayCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceStatus: {
Type: schema.TypeString,
Expand Down Expand Up @@ -306,6 +311,7 @@ func resourceIBMISPublicGatewayRead(d *schema.ResourceData, meta interface{}) er
d.Set(ResourceControllerURL, controller+"/vpc-ext/network/publicGateways")
d.Set(ResourceName, *publicgw.Name)
d.Set(ResourceCRN, *publicgw.CRN)
d.Set(isPublicGatewayCRN, *publicgw.CRN)
d.Set(ResourceStatus, *publicgw.Status)
if publicgw.ResourceGroup != nil {
d.Set(isPublicGatewayResourceGroup, *publicgw.ResourceGroup.ID)
Expand Down
8 changes: 8 additions & 0 deletions ibm/resource_ibm_is_ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

const (
isKeyName = "name"
IsKeyCRN = "crn"
isKeyPublicKey = "public_key"
isKeyType = "type"
isKeyFingerprint = "fingerprint"
Expand Down Expand Up @@ -107,6 +108,12 @@ func resourceIBMISSSHKey() *schema.Resource {
Description: "The crn of the resource",
},

IsKeyCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceGroupName: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -237,6 +244,7 @@ func keyGet(d *schema.ResourceData, meta interface{}, id string) error {
d.Set(ResourceControllerURL, controller+"/vpc-ext/compute/sshKeys")
d.Set(ResourceName, *key.Name)
d.Set(ResourceCRN, *key.CRN)
d.Set(IsKeyCRN, *key.CRN)
if key.ResourceGroup != nil {
d.Set(ResourceGroupName, *key.ResourceGroup.Name)
d.Set(isKeyResourceGroup, *key.ResourceGroup.ID)
Expand Down
7 changes: 7 additions & 0 deletions ibm/resource_ibm_is_subnet_network_acl_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ func resourceIBMISSubnetNetworkACLAttachment() *schema.Resource {
Description: "Network ACL name",
},

isNetworkACLCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn for this Network ACL",
},

isNetworkACLVPC: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -238,6 +244,7 @@ func resourceIBMISSubnetNetworkACLAttachmentRead(d *schema.ResourceData, meta in
return fmt.Errorf("Error getting subnet's (%s) attached network ACL: %s\n%s", id, err, response)
}
d.Set(isNetworkACLName, *nwacl.Name)
d.Set(isNetworkACLCRN, *nwacl.CRN)
d.Set(isNetworkACLVPC, *nwacl.VPC.ID)
if nwacl.ResourceGroup != nil {
d.Set(isNetworkACLResourceGroup, *nwacl.ResourceGroup.ID)
Expand Down
8 changes: 8 additions & 0 deletions ibm/resource_ibm_is_vpn_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
isVPNGatewayName = "name"
isVPNGatewayResourceGroup = "resource_group"
isVPNGatewayMode = "mode"
isVPNGatewayCRN = "crn"
isVPNGatewayTags = "tags"
isVPNGatewaySubnet = "subnet"
isVPNGatewayStatus = "status"
Expand Down Expand Up @@ -137,6 +138,12 @@ func resourceIBMISVPNGateway() *schema.Resource {
Description: "The crn of the resource",
},

isVPNGatewayCRN: {
Type: schema.TypeString,
Computed: true,
Description: "The crn of the resource",
},

ResourceStatus: {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -391,6 +398,7 @@ func vpngwGet(d *schema.ResourceData, meta interface{}, id string) error {
d.Set(ResourceControllerURL, controller+"/vpc/network/vpngateways")
d.Set(ResourceName, *vpnGateway.Name)
d.Set(ResourceCRN, *vpnGateway.CRN)
d.Set(isVPNGatewayCRN, *vpnGateway.CRN)
d.Set(ResourceStatus, *vpnGateway.Status)
if vpnGateway.ResourceGroup != nil {
d.Set(ResourceGroupName, *vpnGateway.ResourceGroup.Name)
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/is_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ In addition to all argument reference list, you can access the following attribu
- `device` - (String) The name of the device that is associated with the boot volume.
- `volume_id` - (String) The ID of the volume that is associated with the boot volume attachment.
- `volume_crn` - (String) The CRN of the volume that is associated with the boot volume attachment.
- `crn` - (String) The CRN of the instance.
- `disks` - (List) Collection of the instance's disks. Nested `disks` blocks has the following structure:

Nested scheme for `disks`:
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/is_instances.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ In addition to all argument reference list, you can access the following attribu
- `name` - (String) The name of the boot volume.
- `volume_id` - (String) The ID of the volume that is associated with the boot volume attachment.
- `volume_crn` - (String) The CRN of the volume that is associated with the boot volume attachment.
- `crn` - (String) The CRN of the instance.
- `disks` - (List) Collection of the instance's disks. Nested `disks` blocks has the following structure:

Nested scheme for `disks`:
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/is_public_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Review the argument references that you can specify for your data source.
## Attribute reference
In addition to all argument reference list, you can access the following attribute references after your data source is created.

- `crn` - (String) The CRN for this public gateway.
- `floating_ip` - (List) List of the nested block describes the floating IP of the gateway with the **id** and **address** details.

Nested scheme for `floating_ip`:
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/is_public_gateways.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Review the attribute references that you can access after you retrieve your data
- `public_gateways` - (List) List of all Public Gateways in the IBM Cloud infrastructure region.

Nested scheme for `public_gateways`:
- `crn` - (String) The CRN for this public gateway.
- `id` - (String) The ID of the public gateway.
- `status` - (String) The status of the public gateway.
- `vpc` - (String) The VPC ID of the public gateway.
Expand Down
3 changes: 2 additions & 1 deletion website/docs/d/is_ssh_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ Review the argument references that you can specify for your data source.
## Attribute reference
In addition to all argument reference list, you can access the following attribute references after your data source is created.

- `crn` - (String) The CRN for this key.
- `id` - (String) The ID of the SSH key.
- `fingerprint`- (String) The SHA256 fingerprint of the public key.
- `length` - (String) The length of the SSH key.
- `type` - (String) The crypto system that is used by this key.
- `public_key` - (String) The public SSH key value.
- `type` - (String) The crypto system that is used by this key.
1 change: 1 addition & 0 deletions website/docs/d/is_volume.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Review the argument references that you can specify for your data source.
In addition to all argument reference list, you can access the following attribute references after your data source is created.

- `capacity` - (String) The capacity of the volume in gigabytes.
- `crn` - (String) The crn of this volume.
- `encryption_key` - (String) The key to use for encrypting this volume.
- `encryption_type` - (String) The type of ecryption used in the volume [**provider_managed**, **user_managed**].
- `iops` - (String) The bandwidth for the volume.
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/is_floating_ip.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Review the argument references that you can specify for your resource.
In addition to all argument reference list, you can access the following attribute reference after your resource is created.

- `address` - (String) The floating IP address that was created.
- `crn` - (String) The CRN for this floating IP.
- `id` - (String) The unique identifier of the floating IP address.
- `status` - (String) The provisioning status of the floating IP address.

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/is_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ In addition to all argument reference list, you can access the following attribu
- `name` - (String) The name of the boot volume.
- `profile` - (String) The profile of the volume.
- `size`- (Integer) The capacity of the volume in gigabytes.
- `crn` - (String) The CRN of the instance.
- `disks` - (List of Strings) The collection of the instance's disks. Nested `disks` blocks have the following structure:

Nested scheme for `disks`:
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/is_public_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Review the argument references that you can specify for your resource.
## Attribute reference
In addition to all argument reference list, you can access the following attribute reference after your resource is created.

- `crn` - (String) The crn for the public gateway.
- `id` - (String) The unique identifier that was assigned to your public gateway.
- `status` - (String) The provisioning status of your public gateway.

Expand Down
Loading