func NewDataDiskAttachment(ctx *pulumi.Context,
	name string, args *DataDiskAttachmentArgs, opts ...pulumi.ResourceOption) (*DataDiskAttachment, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.Caching == nil {
		return nil, errors.New("invalid value for required argument 'Caching'")
	}
	if args.Lun == nil {
		return nil, errors.New("invalid value for required argument 'Lun'")
	}
	if args.ManagedDiskId == nil {
		return nil, errors.New("invalid value for required argument 'ManagedDiskId'")
	}
	if args.VirtualMachineId == nil {
		return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
	}
	var resource DataDiskAttachment
	err := ctx.RegisterResource("azure:compute/dataDiskAttachment:DataDiskAttachment", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewDataDiskAttachment registers a new resource with the given unique name, arguments, and options.
NewDataDiskAttachment registers a new resource with the given unique name, arguments, and options.
// NewDataDiskAttachment registers a new resource with the given unique name arguments and options .
func NewDataDiskAttachment(ctx *pulumi.Context,
	name string, args *DataDiskAttachmentArgs, opts ...pulumi.ResourceOption) (*DataDiskAttachment, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.Caching == nil {
		return nil, errors.New("invalid value for required argument 'Caching'")
	}
	if args.Lun == nil {
		return nil, errors.New("invalid value for required argument 'Lun'")
	}
	if args.ManagedDiskId == nil {
		return nil, errors.New("invalid value for required argument 'ManagedDiskId'")
	}
	if args.VirtualMachineId == nil {
		return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
	}
	var resource DataDiskAttachment
	err := ctx.RegisterResource("azure:compute/dataDiskAttachment:DataDiskAttachment", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewDataDiskAttachment ( ctx * pulumi . Context , name string , args * DataDiskAttachmentArgs , opts ... pulumi . ResourceOption ) ( * DataDiskAttachment , error ) { if args == nil { return nil , errors . New ( " " ) } if args . Caching == nil { return nil , errors . New ( " " ) } if args . Lun == nil { return nil , errors . New ( " " ) } if args . ManagedDiskId == nil { return nil , errors . New ( " " ) } if args . VirtualMachineId == nil { return nil , errors . New ( " " ) } var resource DataDiskAttachment err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewDataDiskAttachment registers a new resource with the given unique name, arguments, and options.
NewDataDiskAttachment registers a new resource with the given unique name arguments and options .